Title: RE: Why tuple with one item is no tuple

[Gregor Horvath]

#-  >>>type(('1'))
#- <type 'str'>
#-
#- I wonder why ('1') is no tuple????

The parentheses don't create the tuple, the comma does:

>>> ('1')
'1'
>>> ('1',)
('1',)
>>> '1',
('1',)


.    Facundo

Bitácora De Vuelo: http://www.taniquetil.com.ar/plog
PyAr - Python Argentina: http://pyar.decode.com.ar/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to