Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
whdans
SUBMITTED BY:
rlawhdans
DATE:
April 21, 2016, 6:23 p.m.
FORMAT:
Text only
SIZE:
133 Bytes
Raw
Download
Tweet
HITS:
541
Go to comments
Report
# find sum of digits
n=input("enter an integer : ")
total=0
foriinn:# string is iterable
# print(i)
total+=int(i)
print(total)
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus