Posted by & filed under python.

d={}
if type(d)==type(dict()):
     print 'Its dict!'
else:
     print 'Its not dict'

2 способ (более лучший ИМХО):

d={}
if type(d) is dict:
     print 'Its dict!'
else:
     print 'Its not dict'
Опубликовать в Facebook
Опубликовать в Google Plus

Leave a Reply

You must be logged in to post a comment.