Wether homework or not, I highly recommend studying the Getopt module which is part of the standard distribution and can handle command line input pretty well.
Have a nice day All decision is left to your taste
At least its a starting point if you need to write shell scripts or ambivalent ones. Only if you know what your input is you can process on the input (as is). Have a nice day All decision is left to your taste