Question about tuple lengths

Carl J. Van Arsdall cvanarsdall at mvista.com
Wed Dec 14 12:54:31 EST 2005


 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? 

-- 

Carl J. Van Arsdall
cvanarsdall at mvista.com
Build and Release
MontaVista Software




More information about the Python-list mailing list