sys.stdin.readline() with out error check : Standard Read : Development PYTHON examples


PYTHON examples » Development » Standard Read »

 

sys.stdin.readline() with out error check




import sys, string
sum = 0

while 1:
    line = sys.stdin.readline()
    if not line: break
    sum = sum + string.atoi(line[:-1])  
print sum

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Development
» Standard Read