[code=python]¶
# Python 2.x¶
isinstance(var, unicode)¶
# Python 3.x¶
isinstance(var, str)¶
[/code]