Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> import unicodedata >>> unicdodedata.category('l') Traceback (most recent call last): File "", line 1, in unicdodedata.category('l') NameError: name 'unicdodedata' is not defined >>> unicodedata.category('A') 'Lu' >>> unicodedata.category('1') 'Nd' >>> unicodedata.category('+') 'Sm' >>> unicodedata.category('羊') 'Lo' >>> ================================ RESTART ================================ >>> >>> derp('') '' >>> derp('asdfsadfdsf234324 02432432432 oueorwueew') 'asdfsadfdsfoueorwueew' >>> derp('asdfsadfdsf234324 羊 02432432432 oueorwueew') 'asdfsadfdsf羊oueorwueew' >>> #look for a substring inside of another string >>> 'ell' in 'hello' True >>> 'ell' in 'hullo' False >>> #split a string up based on some substring >>> 'a-bunch-of-words'.split('-') ['a', 'bunch', 'of', 'words'] >>> 'a-bunch-of-words'.split('--') ['a-bunch-of-words'] >>> 'a-bunch--of-words'.split('--') ['a-bunch', 'of-words'] >>> #find exatly where a certain substring occurs >>> 'hey * you'.find(' * ') 3 >>> # this did not do what I thought it would. >>> 'a bunch of nonsense'.encode() b'a bunch of nonsense' >>>