I'm writing a password management program that encrypts the passwords and saves the hashes to a document. Should I import before defining the functions, import in the functions they are used, or import after defining the functions but before running the functions. I'm trying to make my code as neat as possible. I'm currently importing passlib.hash, sha256_crypt, os.path, time. Sorry if it's not clear I'm kind of new and trying to teach myself. Any advice helps.
Typically imports come first in any design pattern I have seen. Imports > large scope variables > functions.
Python - Does it matter if i import modules before or after defining functions? Newb Ques