lambdamusic
2/7/2013 - 9:26 PM

Python: Python: checking the type of an object

Python: Python: checking the type of an object

>>> s = "A Simple String"
>>> print isinstance(s, basestring)
True
>>> print isinstance(s, dict)
False
>>>