您的位置:首页 > 其它

第五章循环

2015-06-11 23:00 281 查看
把某件事情作为另一件事导入

import somemodule

from somemodule import somefunction

from somemodule import *

import math as 别名

from math import sqrt as 别名

链式赋值

x=y=somefunction()

增量赋值

x+=1

假 False None 0 "" () [] {}

if

else

elif

x is y  是不是同一个对象

x is not y 

x in y

x not in y

and or

断言 assert

for 

while

eval 将字符串作为表达式计算,并且 返回值

enumerate 产生用于迭代的键值对
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: