a = int(input())
a = str(a)
def lol(a):
result = 0
for _ in a:
result += int(_)
return result
print(lol(a))
Объяснение:
a = int(input())
a = str(a)
def lol(a):
result = 0
for _ in a:
result += int(_)
return result
print(lol(a))
Объяснение: