why is ascii text considered to be kind of unicode text how large an impact does python ' string types change have on your codetest your knowledgeanswers python has three string typesstr (for unicode textincluding ascii)bytes (for binary data with absolute byte values)and bytearray ( mutable flavor of bytesthe str type usually represents content stored on text fileand the other two types generally represent content stored on binary files python has two main string typesstr (for -bit text and binary dataand unicode (for possibly wider character unicode textthe str type is used for both text and binary file contentunicode is used for text file content that is generally more complex than -bit characters python (but not earlieralso has ' bytearray typebut it' mostly back-port and doesn' exhibit the sharp text/binary distinction that it does in the mapping from to string types is not directbecause ' str equates to both str and bytes in xand ' str equates to both str and unicode in the mutability of bytearray in is also unique in generalthoughunicode text is handled by str and unicodebyte-based data is handled by bytes and strand bytes and str can both handle some simpler types of text python ' string types share almost all the same operationsmethod callssequence operationsand even larger tools like pattern matching work the same way on the other handonly str supports string formatting operationsand bytear ray has an additional set of operations that perform in-place changes the str and bytes types also have methods for encoding and decoding textrespectively non-ascii unicode characters can be coded in string with both hex (\xnnand unicode (\unnnn\unnnnnnnnescapes on some machinessome non-ascii characters--certain latin- charactersfor example--can also be typed or pasted directly into codeand are interpreted per the utf- default or source code encoding directive comment in xtext-mode files assume their file content is unicode text (even if it' all asciiand automatically decode when reading and encode when writing with binary-mode filesbytes are transferred to and from the file unchanged the contents of text-mode files are usually represented as str objects in your scriptand the contents of binary files are represented as bytes (or bytearrayobjects textmode files also handle the bom for certain encoding types and automatically translate end-of-line sequences to and from the single \ character on input and output unless this is explicitly disabledbinary-mode files do not perform either of these steps python uses codecs open for unicode fileswhich encodes and decodes similarly ' open only translates line ends in text mode unicode and byte strings