How can I tell if a python variable is a string or a list?

isinstance(your_var, basestring)

Leave a Comment