the range of code points for other kinds of unicode text may be wider (more on character sets and unicode in you can use loop to apply these functions to all characters in string if required these tools can also be used to perform sort of string-based math to advance to the next characterfor exampleconvert and do the math in integers ' chr(ord( ' chr(ord( ' at least for single-character stringsthis provides an alternative to using the built-in int function to convert from string to integer (though this only makes sense in character sets that order items as your code expects!)int(' ' ord(' 'ord(' ' such conversions can be used in conjunction with looping statementsintroduced in and covered in depth in the next part of this bookto convert string of binary digits to their corresponding integer values each time through the loopmultiply the current value by and add the next digit' integer valueb ' convert binary digits to integer with ord while !'' (ord( [ ]ord(' ') [ : left-shift operation ( < would have the same effect as multiplying by here we'll leave this change as suggested exercisethoughboth because we haven' studied loops in detail yet and because the int and bin built-ins we met in handle binary conversion tasks for us as of python and int(' ' bin( ' convert binary to integerbuilt-in convert integer to binarybuilt-in given enough timepython tends to automate most common tasksstrings in action