Python 命令

python -V  查看当前python版本

exit()  退出

control + P  上一行代码

control + N  下一行代码

len()  获取列表有多少项

append()  在列表末尾添加一个元素

pop()  从末尾删除一个元素

remove()  删除一个元素

insert()  插入一个元素

 

for 目标标示符 in 列表:

  列表处理代码

(注意列表处理代码必须缩进)

 

if (条件):

  XXX

else:

  OOO

 

isinstance()  判断是否为某一类型

 

def 函数名 (参数)

  函数代码

 

posted @ 2015-03-29 00:58  mobilefeng  阅读(161)  评论(0编辑  收藏  举报