Flag control variable

Larry Martell larry.martell at gmail.com
Tue Feb 11 18:44:09 CET 2014


On Tuesday, February 11, 2014, <luke.geelen at gmail.com> wrote:

> hello,
> i'd like to know how to set up a flag to change a variable,
> for example, i want a simple script to combine 2 numbers,
>
>
> sum = num + another_num
> print "Now the sum of the numbers equals : ", sum
>
> how could i make it so that if i type python ./script.py 21 41
> that i get the sum of 21 and 41 ?
>
> Google for python command line arguments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140211/077962ba/attachment.html>


More information about the Python-list mailing list