we do similar things with the specifiers for price and subtotal for pricewe use { fin both caseswe're specifying space as the fill characterbut we use the symbolsrespectivelyto represent that the numbers should be aligned to the left or right within the minimum space of eight or seven characters furthereach float should be formatted to two decimal places the "typecharacter for different types can affect formatting output as well we've seen the sdand typesfor stringsintegersand floats most of the other format specifiers are alternative versions of thesefor exampleo represents octal format and represents hexadecimal for integers the type specifier can be useful for formatting integer separators in the current locale' format for floating-point numbersthe type will multiply by and format float as percentage while these standard formatters apply to most built-in objectsit is also possible for other objects to define nonstandard specifiers for exampleif we pass datetime object into formatwe can use the specifiers used in the datetime strftime functionas followsimport datetime print("{ :% -% -% % :% % }formatdatetime datetime now())it is even possible to write custom formatters for objects we create ourselvesbut that is beyond the scope of this book look into overriding the __format__ special method if you need to do this in your code the most comprehensive instructions can be found in pep at the details are bit dry you can find more digestible tutorials using web search the python formatting syntax is quite flexible but it is difficult mini-language to remember use it every day and still occasionally have to look up forgotten concepts in the documentation it also isn' powerful enough for serious templating needssuch as generating web pages there are several third-party templating libraries you can look into if you need to do more than basic formatting of few strings strings are unicode at the beginning of this sectionwe defined strings as collections of immutable unicode characters this actually makes things very complicated at timesbecause unicode isn' really storage format if you get string of bytes from file or socketfor examplethey won' be in unicode they willin factbe the built-in type bytes bytes are immutable sequences of wellbytes bytes are the lowest-level storage format in computing they represent bitsusually described as an integer between and or hexadecimal equivalent between and ff bytes don' represent anything specifica sequence of bytes may store characters of an encoded stringor pixels in an image