...
...
Favor list comprehensions over .map
[
index
for index
in range(5)
]Favor using using module notation (?) over import functions directly. Importing functions directly generally reduces readability, as it is not immediately apparent that the function is being imported.
Avoid
from top.utils import do_thing
do_thing()Favor
from top import utils
utils.do_thing()