How to tell if function was passed a list or a string?
trebucket at gmail.com
trebucket at gmail.com
Wed May 17 19:16:38 EDT 2006
>>> import types
>>> type("") is types.ListType
False
>>> type("") is types.StringType
True
>>> type([]) is types.StringType
False
>>> type([]) is types.ListType
True
More information about the Python-list
mailing list