with open("input.txt") as f:
reads=list(map(int,f.read().split(",")))
with open("output.txt", "w") as f:
count=0
for i in reads:
if i > 0:
count+=1
f.write(str(count))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
with open("input.txt") as f:
reads=list(map(int,f.read().split(",")))
with open("output.txt", "w") as f:
count=0
for i in reads:
if i > 0:
count+=1
f.write(str(count))