input-258345
output-14
ex-2+8+4=14
myList = input()
result = 0
for i in myList:
if not i % 2:
result += i
print(result)
I am getting an error:
if not i % 2:
TypeError: not all arguments converted during string formatting
mylist = list(input())
result = 0
for i in mylist:
if int(i) % 2 ==0:
result += int(i)
print(result)