Simple tuple question

Matthew Hirsch meh9 at cornell.edu
Mon Mar 20 21:00:15 CET 2000


Thanks,

That's what I was looking for.

Matt


In article <38D665E4.230EB189 at cs.nmt.edu>, Jeff Shipman 
<shippy at cs.nmt.edu> wrote:

> Well, there are two ways you can go about it:
> 
> if type(a) == type(()):
>    print 'yes'
> 
> -or-
> 
> import types
> 
> if type(a) == types.TupleType:
>    print 'yes'
> 
> Matthew Hirsch wrote:
> > 
> > Hi All,
> > 
> > If I have a tuple a=(1,2,3)
> > 
> > how do I test that this is a tuple?



More information about the Python-list mailing list