Flag control variable

luke.geelen at gmail.com luke.geelen at gmail.com
Wed Feb 12 12:15:49 EST 2014


Op woensdag 12 februari 2014 17:10:36 UTC+1 schreef Alain Ketterlin:
> 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.

thanks a lot



More information about the Python-list mailing list