(六)函数----(七)
目录
内置函数
内置函数一共有68个
参考文件:https://docs.python.org/3/library/functions.html#object
a.按块分类:
按块分类:作用域相关 | global() | locals() | 2 | ||
字符串类型的代码执行 | eval() | exec() | compile() | 3 | |
输入输出 | input() | print() | 2 | ||
内存相关 | hash() | id() | 2 | ||
文件操作 | open() | 1 | |||
模块相关 | __import__() | 1 | |||
帮助 | help() | 1 | |||
调用相关 | callable() | 1 | |||
查看内置属性 | dir() | 1 | |||
数据类型 | bool() | int() | float() | complex() | 4 |
进制转换 | bin() | oct() | hex() | 3 | |
数学运算 | abs() | divmod() | min() | max() | |
sum() | round() | pow() | 7 | ||
列表和元组 | list() | tuple() | 2 | ||
字符串 | str() | bytes() | format() | bytearry() | |
memonryview() | ord() | chr() | ascii() | ||
repr() | 9 | ||||
序列 | reversed() | slice() | 2 | ||
字典 | dict() | 1 | |||
集合 | set() | frozenset() | 2 | ||
数据集合 | len() | sorted() | enumerate() | all() | |
map() | any() | zip() | filter() | 8 | |
可迭代的 | range() | 1 | |||
迭代器 | next() | iter() | 2 |
b.按字母排序:
内置函数 | ||||
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() |
byteearray() | filter() | issubclass() | pow() | super() |
bytes() | float() | iter() | print() | tuple() |
callable() | format() | len() | property() | type() |
chr() | frozenset() | list() | range() | vars() |
classmethod() | getattr() | locals() | repr() | zip() |
complie() | globals() | map() | reversed() | __import__() |
complex() | hasattra() | max() | round() | |
delattr() | hash() | memoryview() | set() |