1. change "12345" into integer char by char, used when not knowing how many digits are there behind each num
     #also used to calculate a^4 + b^3 + c ^2 + d ^1 + e^0
     num = "12345"
     i = 0
     integer = 0
     count = 1
     while i < len(num) and num[i].isdigit():
         integer = integer * count + num[i]

results matching ""

    No results matching ""