xml and html text parsing parsersgrammars custom language parsersboth handcoded and generated embedding running python code with eval and exec built-ins and more natural language processing for simpler taskspython' built-in string object is often all we really need python strings can be indexedconcatenatedslicedand processed with both string method calls and built-in functions our main emphasis in this is mostly on higherlevel tools and techniques for analyzing textual information and languagebut we'll briefly explore each of these techniques in turn let' get started some readers may have come to this seeking coverage of unicode texttoobut this topic is not presented here for look at python' unicode supportsee ' discussion of string tools' discussion of text and binary file distinctions and encodingsand ' coverage of text in tkinter guis unicode also appears in various internet and database topics throughout this book ( email encodingsbecause unicode is core language topicall these will also refer you to the fuller coverage of unicode in learning pythonfourth edition most of the topics in this including string methods and pattern matchingapply to unicode automatically simply because the python str string type is unicodewhether ascii or wider string method utilities the first stop on our text and language tour is the most basicpython' string objects come with an array of text processing toolsand serve as your first line of defense in this domain as you undoubtedly know by nowconcatenationslicingformattingand other string expressions are workhorses of most programs ( ' including the newer format method in this categoryas it' really just an alternative to the expression)'spam eggs ham'[ : 'eggs 'spam 'eggs ham'spam eggs ham'spam % % ('eggs''ham''spam eggs ham'spam {{}format('eggs''ham''spam eggs ham'spam "%- "%+ ('ham' text and language slicingsubstring extraction concatenation (and *len()[ix]formatting expressionsubstitution formatting methodalternative more complex formatting