> Python doesn't have a builtin method for doing this then, right?
People are ignoring your question and answering the question that you
should have asked :-) Here is the answer to the wrong question:
>>> a = []
>>> type(a) is type([])
1
>>> type(a) is type("")
0
Cheers,
Brian