Simple tuple question

Matthew Hirsch meh9 at cornell.edu
Mon Mar 20 18:02:11 CET 2000


Hi All,

If I have a tuple a=(1,2,3)

how do I test that this is a tuple?

I'm looking for something like , if a is a tuple, then print yes.

type(a) returns <type 'tuple'>, but I can't really seem to do anything 
with this statement.

Please reply to the newsgroup, not e-mail.

Thanks for your help,
Matt



More information about the Python-list mailing list