Does it matter what order imports go?
Does it matter what order they are in?
Steven Parker171,373 Points
Imports that are dependent on other imports should go after any they depend on. Otherwise, while not technically essential, the PEP-8 guide recommends:
Imports should be grouped in the following order:
- Standard library imports.
- Related third party imports.
- Local application/library specific imports.
You should put a blank line between each group of imports.
See the PEP-8 Guide for more details.