osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flag control variable


luke.geelen at gmail.com writes:

> 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

C = int(sys.argv[3]) if len(sys.argv) > 3 else 0

is one possibility.

-- Alain.