- From: python-novice@xxxxxx
- Date: Thu, 22 Sep 2005 18:34:05 +0200 (MEST)
being an almost complete Python AND programming neophyte I would like to ask
the following - very elementary, as I might suspect - question:
How do I do the following flawed things right:
if x == a1:
a1 = a1 + 1
elif x == a2:
a2 = a2 + 1
Now if I call f with f(a2) only a1, of course, is incremented because the
if-clause does only check for the value of the input and the values of a1
and a2 are identical.
So how do I define the function such as to discrimate wheter I call it by
f(a1) or f(a2) ?
Thank you very much,
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
- Prev by Date: Re: Calling python scripts from C# programs
- Next by Date: Re: wxPython Notebook crash when pressing alt key
- Previous by thread: Python installation root directory problem
- Next by thread: Re: Indexed variables