('spam'"'spam'"raw interactive echo displays see the sidebar in ' "str and repr display formatson page for more on these topics of theseint and str are the generally prescribed to-number and to-string conversion techniques nowalthough you can' mix strings and number types around operators such as +you can manually convert operands before that operation if neededs " typeerrorcan' convert 'intobject to str implicitly int(si force addition str( ' force concatenation similar built-in functions handle floating-point-number conversions to and from stringsstr( )float(" "(' ' text " - float(text - shows more digits before and laterwe'll further study the built-in eval functionit runs string containing python expression code and so can convert string to any kind of object the functions int and float convert only to numbersbut this restriction means they are usually faster (and more securebecause they do not accept arbitrary expression codeas we saw briefly in the string formatting expression also provides way to convert numbers to strings we'll discuss formatting further later in this character code conversions on the subject of conversionsit is also possible to convert single character to its underlying integer code ( its ascii byte valueby passing it to the built-in ord function--this returns the actual binary value used to represent the corresponding character in memory the chr function performs the inverse operationtaking an integer code and converting it to the corresponding characterord(' ' chr( 'stechnicallyboth of these convert characters to and from their unicode ordinals or "code points,which are just their identifying number in the underlying character set string fundamentals