If and type() : Type : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Type »

 

If and type()


L = [None100

if type(L== type([]):                      # Type testing, if you must...
    print 'yes

if type(L== list:                          # Using the type name
    print 'yes

if isinstance(L, list):                      # Object-oriented tests
    print 'yes'



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Type