PyCharm does this automatically now by use of Code -> Optimize Imports
. It also sorts them into groups per PEP 8.
See https://www.jetbrains.com/help/pycharm/optimizing-imports.html for details.
PyCharm does this automatically now by use of Code -> Optimize Imports
. It also sorts them into groups per PEP 8.
See https://www.jetbrains.com/help/pycharm/optimizing-imports.html for details.