sys.argv
type
id
math.pow(x,y) x**y
math.gcd(a,b) #max 公约数
math.factorial(x) x!
pow(x,y)
gcd(a,b)
factorial(x)
math.floor(x) #向下取整
math.ceil(x)
floor
ceil
len(a)
a.index(x)#下标 x在a中出现的第一个索引位置
print(x in a) #判断x zai a li ma
b.reverse()#反向输出
a = tuple(a)#列表转换为元组,利用 tuple()
a = list(a)# 元组转换为列表,利用 list()。
t = (1,3,4,12,2)#yuan zu
引入数学模块 math,并定义一个别名 m,利用别名 m 调用 sqrt 函数,
求平方根。n = m.sqrt(n) import math as m