Base conversion algorithms in python July 27, 2018 Ascii to Integer Input - '123' Output - 123 def atoi (s): res = 0 for i in range ( len (s)): n = ord (s[i]) - ord ( '0' ) res = res * 10 + n return res Read more