Python: Python: checking the type of an object
>>> s = "A Simple String" >>> print isinstance(s, basestring) True >>> print isinstance(s, dict) False >>>