Hmm... An idea: if a,b==c,d:
Wojtek Walczak
gminick at hacker.pl
Tue Nov 26 15:45:50 EST 2002
Dnia Tue, 26 Nov 2002 17:36:15 +1300, Greg Ewing napisaĆ(a):
>> It doesn't have ()s, so it ain't two tuples. Easy enough, da?
> Sorry, it's not that easy. Commas make tuples in Python,
> not parentheses. Try this if you don't believe me:
> a = 1, 2
> print a
...or:
>>> def qwe():
... return 1,2
...
>>> qwe()
(1, 2)
>>> type(qwe())
<type 'tuple'>
>>>
Tuples are videly used. The best description of them is the one from
Dive Into Python ('Introducing tuples')
-- <http://diveintopython.org/odbchelper_tuple.html>
--
[ ] gminick (at) underground.org.pl http://gminick.linuxsecurity.pl/ [ ]
[ "Po prostu lubie poranna samotnosc, bo wtedy kawa smakuje najlepiej." ]
More information about the Python-list
mailing list