Hello again!
I've been trying to make my code more generic, and one of the things I want to do is to use a given file name, which can change (in the command line) instead of using a specific name.
My code looks like:
def func1
bla bla bla
def func2
bla bla bla
main code.
My questions are:
Should I name the main code "main" in order to use sys.argv?
What is the exact syntax of argv? If you want to put the first argument (as in 1, not 0) in a string variable, how do I do that?
Should I import anything, and if so, where should I locate the "import..." line? before all the functions, before the main code etc?
I have tried a python websites, but I can't find answers to those questions.
Thanks