# -*- coding: utf-8 -*-
aaa = u'ahaha'
if isinstance( aaa, str ):
print 'aaa is str'
else:
print 'aaa is not str'
if isinstance( aaa, unicode ):
print 'aaa is unicode'
else:
print 'aaa is not unicode'
if isinstance( aaa, basestring ):
print 'aaa is basestring'
else:
print 'aaa is not basestring'
bbb = 'ahaha'
if isinstance( bbb, str ):
print 'bbb is str'
else:
print 'bbb is not str'
if isinstance( bbb, unicode ):
print 'bbb is unicode'
else:
print 'bbb is not unicode'
if isinstance( bbb, basestring ):
print 'bbb is basestring'
else:
print 'bbb is not basestring'
IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KCmFhYSA9IHUnYWhhaGEnCgppZiBpc2luc3RhbmNlKCBhYWEsIHN0ciApOgogICAgcHJpbnQgJ2FhYSBpcyBzdHInCmVsc2U6CiAgICBwcmludCAnYWFhIGlzIG5vdCBzdHInCiAgICAKaWYgaXNpbnN0YW5jZSggYWFhLCB1bmljb2RlICk6CiAgICBwcmludCAnYWFhIGlzIHVuaWNvZGUnCmVsc2U6CiAgICBwcmludCAnYWFhIGlzIG5vdCB1bmljb2RlJwogICAgCmlmIGlzaW5zdGFuY2UoIGFhYSwgYmFzZXN0cmluZyApOgogICAgcHJpbnQgJ2FhYSBpcyBiYXNlc3RyaW5nJwplbHNlOgogICAgcHJpbnQgJ2FhYSBpcyBub3QgYmFzZXN0cmluZycKICAgIApiYmIgPSAnYWhhaGEnCgppZiBpc2luc3RhbmNlKCBiYmIsIHN0ciApOgogICAgcHJpbnQgJ2JiYiBpcyBzdHInCmVsc2U6CiAgICBwcmludCAnYmJiIGlzIG5vdCBzdHInCiAgICAKaWYgaXNpbnN0YW5jZSggYmJiLCB1bmljb2RlICk6CiAgICBwcmludCAnYmJiIGlzIHVuaWNvZGUnCmVsc2U6CiAgICBwcmludCAnYmJiIGlzIG5vdCB1bmljb2RlJwogICAgCmlmIGlzaW5zdGFuY2UoIGJiYiwgYmFzZXN0cmluZyApOgogICAgcHJpbnQgJ2JiYiBpcyBiYXNlc3RyaW5nJwplbHNlOgogICAgcHJpbnQgJ2JiYiBpcyBub3QgYmFzZXN0cmluZyc=