using print and automatic echoes (the following are all run in python and may vary slightly in older versions)num num print(num auto-echoes print explicitly '%enum ' - '% fnum ' '{ : }format(num' string formatting expression alternative floating-point format string formatting methodpython and later the last three of these expressions employ string formattinga tool that allows for format flexibilitywhich we will explore in the upcoming on strings (its results are strings that are typically printed to displays or reports str and repr display formats technicallythe difference between default interactive echoes and print corresponds to the difference between the built-in repr and str functionsrepr('spam'"'spam'str('spam''spamused by echoesas-code form used by printuser-friendly form both of these convert arbitrary objects to their string representationsrepr (and the default interactive echoproduces results that look as though they were codestr (and the print operationconverts to typically more user-friendly format if available some objects have both-- str for general useand repr with extra details this notion will resurface when we study both strings and operator overloading in classesand you'll find more on these built-ins in general later in the book besides providing print strings for arbitrary objectsthe str built-in is also the name of the string data typeand in may be called with an encoding name to decode unicode string from byte string ( str( 'xy''utf '))and serves as an alternative to the bytes decode method we met in we'll study the latter advanced role in of this book comparisonsnormal and chained so farwe've been dealing with standard numeric operations (addition and multiplication)but numberslike all python objectscan also be compared normal comparisons work for numbers exactly as you' expect--they compare the relative magnitudes numeric types