参考:
s = input()[::-1] index = 0 while 1: if s[index] != '0': break index += 1 l = s[index:] print(l)
a=123 b=int(''.join(str(a)[::-1]))