On May 11, 10:54 pm, [EMAIL PROTECTED] wrote:
> I thought that just putting a value inside ( )
> would make a tuple. Apparently that is not the case.

It's not the case at all. Check out the Tuples & Sequences section in
the python docs at http://docs.python.org/tut/node7:

"A tuple consists of a number of values separated by commas"

So it's not the parentheses that define it as a tuple, but the comma.

>>> my_tuple = 1,
>>> my_tuple
(1,)
>>> type(my_tuple)
<type 'tuple'>

Hope this helps.

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

Reply via email to