+ 5
Is it just me, or do you also order your python imports by their lengths, for aesthetics?
For example, like this: import numpy as np import pandas as pd import seaborn as sns from collections import OrderedDict rather than like this: import seaborn as sns import numpy as np from collections import OrderedDict import pandas as pd Or are there specific conventions I'm not aware of (like the order of their usage in the code)? Just wondering..
5 odpowiedzi
+ 10
Myself, I rather stack them up by theme.
+ 5
@Testing003 Unless you leave it like this with a newline before y - no, it's valid.
+ 3
Nah it's just a matter of personal preference
+ 2
Isnt
"from x import
y"
syntax error?
+ 2
@Testing003 No, it isn't, why would it be?