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'
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'
You must be logged in to post a comment.
Свежие комментарии