Carl J. Van Arsdall wrote:
> 
> From my interpreter prompt:
> 
>>>> tuple = ("blah")
>>>> len(tuple)
> 4
>>>> tuple2 = ("blah",)
>>>> len (tuple2)
> 1
> 
> So why is a tuple containing the string "blah" without the comma of
> length four? Is there a good reason for this or is this a bug?

Additional note:

You should not give a tuple a variable name of tuple, it masks
the built-in tuple() function.  This also goes for str, or other
built-ins.  This will "bite" you at some point if it hasn't already.

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

Reply via email to