str(), unicode() and isinstance : Isinstance : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Isinstance »

 

str(), unicode() and isinstance


print isinstance(u'0xAB', str)
print not isinstance('foo', unicode)
print isinstance(u'', basestring)
print not isinstance('foo', basestring)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Isinstance