Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.086 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; 'variable,': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'subject:variable': 0.16; 'wrote:': 0.18; 'command': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**0': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; "i'd": 0.34; 'could': 0.34; 'received:google.com': 0.35; 'google': 0.35; 'example,': 0.37; 'how': 0.40; '8bit%:29': 0.60; 'numbers': 0.61; 'simple': 0.61; 'sum': 0.64; 'to:addr:gmail.com': 0.65; 'equals': 0.68; '2014,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KsPan8FKIjloqZvksGabTPQT7ygRygPoC50fI3+b25U=; b=D9IPHjzOM1vDIXoSNDuex4qimoBro035zoocVZgDsrMMw9AxeBFeUdVhReHrWDHoJY Jv1dT//RsGX+pJw4lKxaA3QD5kwlhmH8fcdGT++gC/WSROULb/q3HmE86dLw7yKIiIsg FjoLDowDwYgFNcGHL3WZ2tgTBDG3kyHbPDGAw0McR2yFlBthymuZKVY8zCfB61RvI/0X nJS5vaDMXu9O4SJjUruA1w9VgOqmXnLnwLBD9iABFQI0QhKcxCzkacvbBQprHI3CsQvu 8R3kzQPwkbvPiXyVlyUZ3MTxcH7Bp2GkDQ3f/RuLdTepBZOjDI0eGP707BWNLEraiJgh WA9Q== MIME-Version: 1.0 X-Received: by 10.180.93.133 with SMTP id cu5mr15662091wib.32.1392140649527; Tue, 11 Feb 2014 09:44:09 -0800 (PST) In-Reply-To: References: Date: Tue, 11 Feb 2014 12:44:09 -0500 Subject: Re: Flag control variable From: Larry Martell To: "luke.geelen@gmail.com" Content-Type: multipart/alternative; boundary=f46d04389045e49c6804f22500d7 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392140651 news.xs4all.nl 2925 [2001:888:2000:d::a6]:44707 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65932 --f46d04389045e49c6804f22500d7 Content-Type: text/plain; charset=UTF-8 On Tuesday, February 11, 2014, 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. --f46d04389045e49c6804f22500d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Tuesday, February 11, 2014, <luke.geelen@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 =3D 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.=C2=A0=C2=A0
--f46d04389045e49c6804f22500d7--