没有合适的资源?快使用搜索试试~ 我知道了~
首页python中68个内置函数的总结与介绍
资源详情
资源评论
资源推荐

python中中68个内置函数的总结与介绍个内置函数的总结与介绍
主要介绍了python中68个内置函数的总结与介绍,需要的朋友可以参考下
python内置函数内置函数
内置函数就是python给你提供的, 拿来直接用的函数, 比如print., input等. 截止到python版本3.6.2 python一共提供了68个内置
函数.
68个内置函数
abs() dict() help() min() setattr()
all() dir() hex() next() slice()
any() divmod() id() object() sorted()
ascii() enumerate() input() oct() staticmethod()
bin() eval() int() open() str()
bool() exec() isinstance() ord() sum()
bytearray() filter() issubclass() pow() super()
bytes() float() iter() print() tuple()
callable() format() len() property() type()
chr() frozenset() list() range() vars()
classmethod() getattr() locals() repr() zip()
compile() globals() map() reversed() __import__()
complex() hasattr() max() round()
delattr() hash() memoryview() set()
1. 和数字相关和数字相关
(1) 数据类型数据类型
1) bool : 布尔型(True,False)
2) int : 整型(整数)
3) float : 浮点型(小数)
4) complex : 复数
(2) 进制转换进制转换
1) bin() 将给的参数转换成二进制
2) otc() 将给的参数转换成八进制
3) hex() 将给的参数转换成十六进制
print(bin(10)) # 二进制:0b1010
print(hex(10)) # 十六进制:0xa
print(oct(10)) # 八进制:0o12
(3) 数学运算数学运算
1) abs() 返回绝对值
2) divmode() 返回商和余数
3) round() 四舍五入



















安全验证
文档复制为VIP权益,开通VIP直接复制

评论0