摘要:
在python3.0以后的版本中,raw_input和input合体了,取消raw_input,并用input代替,所以现在的版本input接收的是字符串,你可以用:x = int(input("x: "))x = input("input x:")print(int(x)+1) 阅读全文
posted @ 2013-03-04 19:22
helloweworld
阅读(288)
评论(0)
推荐(0)
摘要:
def funName(x): print("call funName") return (x + 1) 阅读全文
posted @ 2013-03-04 14:37
helloweworld
阅读(116)
评论(0)
推荐(0)
摘要:
for eachNum in [0, 1, 2]: print(eachNum)#range()内建函数生成0 1 2... for eachNum in range(3): print(eachNum) foo = 'abc'for c in foo: print(c)输出:012012abc 阅读全文
posted @ 2013-03-04 13:50
helloweworld
阅读(182)
评论(0)
推荐(0)
摘要:
counter = 0while counter < 3: print(counter) counter += 1 print(counter) 阅读全文
posted @ 2013-03-04 13:35
helloweworld
阅读(238)
评论(0)
推荐(0)

浙公网安备 33010602011771号