all three string types in support similar operation setsbut they have different roles the main goal behind this change in was to merge the normal and unicode string types of into single string type that supports both simple and unicode textdevelopers wanted to remove the string dichotomy and make unicode processing more natural given that ascii and other -bit text is really simple kind of unicodethis convergence seems logically sound to achieve this stores text in redefined str type--an immutable sequence of characters (not necessarily bytes)which may contain either simple text such as ascii whose character values fit in single bytesor richer character set text such as utf- whose character values may require multiple bytes strings processed by your script with this type are stored generically in memoryand are encoded to and decoded from byte strings per either the platform unicode default or an explicit encoding name this allows scripts to translate text to different encoding schemesboth in memory and when transferring to and from files while ' new str type does achieve the desired string/unicode mergingmany programs still need to process raw binary data that is not encoded per any text format image and audio filesas well as packed data used to interface with devices or programs you might process with python' struct modulefall into this category because unicode strings are decoded from bytesthey cannot be used to represent bytes to support processing of such truly binary dataa new string typebytesalso was introduced--an immutable sequence of -bit integers representing absolute byte valueswhich prints as ascii characters when possible though distinct object typebytes supports almost all the same operations that the str type doesthis includes string methodssequence operationsand even re module pattern matchingbut not string formatting in xthe general str type fills this binary data rolebecause its strings are just sequences of bytesthe separate unicode type handles richer text strings in more detaila bytes object really is sequence of small integerseach of which is in the range through indexing bytes returns an intslicing one returns another bytesand running the list built-in on one returns list of integersnot characters when processed with operations that assume charactersthoughthe contents of bytes objects are assumed to be ascii-encoded bytes ( the isalpha method assumes each byte is an ascii character codefurtherbytes objects are printed as character strings instead of integers for convenience while they were at itpython developers also added bytearray type in bytear ray is variant of bytes that is mutable and so supports in-place changes it supports the usual string operations that str and bytes doas well as many of the same in-place change operations as lists ( the append and extend methodsand assignment to indexesthis can be useful both for truly binary data and simple types of text assuming your text strings can be treated as raw -bit bytes ( ascii or latin- text)bytearray finally adds direct in-place mutability for text data--something not possible unicode and byte strings