A. initialize variables -> define functions -> script
B. define functions -> initialize variables -> script
C. shut up and get coding
I believe that in Python, it doesn’t make a practical difference. However, for legibility, I would prefer to initialize the global variables before defining my functions and then I’d follow the definitions with the actual script.