主页 > > Python函数 >

Python3 内置函数有哪些?

Python函数 2024-05-24 832

Python3 内置函数包括:

  1. 数学函数:abs(), pmod(), pow(), round(), max(), min(), sum()

  2. 序列函数:len(), sorted(), reversed(), enumerate(), zip(), all(), any()

  3. 字符串函数:str(), chr(), ord(), format(), join(), split(), replace(), capitalize(), lower(), upper(), strip()

  4. 字典函数:dict(), keys(), values(), items(), get(), setdefault(), update(), pop()

  5. 文件函数:open(), close(), read(), write(), seek(), tell(), flush()

  6. 类型转换函数:int(), float(), bool(), str(), list(), tuple(), set(), dict(), frozenset()

  7. 其他函数:print(), input(), range(), id(), hash(), isinstance(), type(), help(), dir(), vars(), locals(), globals()

注意:上述列举的仅为部分常用的 Python3 内置函数,实际上 Python3 内置函数非常多,可以通过 Python3 官方文档查询到完整列表。

本文地址:https://www.cnpython.com/functions/810

版权声明:Python中文网原创文章,转载请注明出处和网址。


标签:

python学习网 Copyright © www.bypython.com.Rights Reserved. 滇ICP备2024016848号

联系方式QQ:123456 | cnzz | 免责声明

本站资料均来源互联网收集整理,作品版权归作者所有,如果侵犯了您的版权,请联系我们删除。