Untitled
unknown
plain_text
5 months ago
351 B
4
Indexable
s = str(input()) so = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] counter = [] counter2 = [] if len(s) > 0 and len(s) < 255: for i in s: if i in so: counter.append(i) print("do dai str:", len(counter)) for i in counter: a = int(i) counter2.append(a) print("tong cac so:", sum(counter2))
Editor is loading...
Leave a Comment