9.14 【必学技巧 14】自动导入解决依赖:Alt+Enter¶

当你使用某个包的某个函数,一般都是需要先导入该包,才能使用的。
有了 PyCharm 后,有多省心呢,它能够根据你的函数,自动查找该函数可能属于的包,经过你的确认后,便能自动导入。
查找的快捷键是 Alt + ↩
最终的使用效果如下:

当你使用某个包的某个函数,一般都是需要先导入该包,才能使用的。
有了 PyCharm 后,有多省心呢,它能够根据你的函数,自动查找该函数可能属于的包,经过你的确认后,便能自动导入。
查找的快捷键是 Alt + ↩
最终的使用效果如下: