Simple tuple question

Pedro Vale Lima eq3pvl at eq.uc.pt
Mon Mar 20 12:12:50 EST 2000


Matthew Hirsch wrote:

> 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.
>

if type(a) == type( () ):
   print "yes"

is this what you want?




More information about the Python-list mailing list