Use raw input to read int value,rawinput,import sys,
Use raw input to read int value,rawinput,import sys,
import sys, stringsum = 0while 1: try: line = raw_input() except EOFError: break else: sum = sum + string.atoi(line) # int(line[:-1]) treats 042 as octalprint sum
相关内容
- Line color,linecolor,from Tkinter
- A calculator,calculator,from Tkinter
- Draw Rectangle,drawrectangle,from Tkinter
- Writing to a Database,writingtodatabase,import MySQL
- Searching Lists,searchinglists,li = ['a', '
- tell(): Returns the current file position,returnsposition,f = open(
- Tools for Working with Lists,workinglists,# The array
- Garbage collector is enabled,garbagecollector,import gcgc_
- locale module accesses a database of culture specific data formats,
- Bind mouse click action to the object on a canvas,bindcanvas,from T
评论关闭