Flag control variable
Dave Angel
davea at davea.name
Wed Feb 12 00:23:14 EST 2014
luke.geelen at gmail.com Wrote in message:
> Can I make it that if
> C = int(sys.argv[3])
> But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
>
Why do you ask for 'automatically'? You're the programmer, write
the test in the code.
if len (sys.argv) == 3:
sys.argv. append ("0")
But of course there are lots of other things you need to check,
so consider all of them at the same time.
--
DaveA
More information about the Python-list
mailing list