Posts: 4,649
Threads: 1,495
Joined: Sep 2016
so, in the end, what i do is start with the full string and pass it to int() in arg 1 while passing 0 in arg 2. this is done under try:. if there is an exception (expecting ValueError) then shorten the string by one character removed from the end until either the string is exhausted, or a success is reached. if success, return that value. if not, raise ValueError.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.