Python
lonpo
hi
展开
-
Python学习总结之一
Using Python as a Calculator1、 两个相除可能会出现 floating point results 2、The equal sign ('=') is used to assign a value to a variable3、 value can be assigned to several variables simultaneously:4、Th原创 2011-12-19 16:50:12 · 726 阅读 · 0 评论 -
Python学习总结二
More Control Flow Tools 控制流动语句 1、if ... elif ... elif ... 2、for语句:>>> # Measure some strings:... a = ['cat', 'window', 'defenestrate']>>> for x in a:... print(x, len(原创 2011-12-19 16:52:13 · 682 阅读 · 0 评论 -
Python学习总结之三
Unpacking Argument Lists 1、 write the function call with the *-operator to unpack the arguments out of a list or tuple。使用*操作符来分离List或元组的参数>>> list(range(3, 6)) # normal call wit原创 2011-12-19 16:53:58 · 1462 阅读 · 0 评论