0
点赞
收藏
分享

微信扫一扫

零基础学Python(第二十二章 常用内置函数)


本套学习内容共计【22】个章节,每个章节都会有对应的从0-1的学习过程详细讲解,希望可以给更多的人提供帮助。

开发环境:【Win10】

开发工具:【Visual Studio 2019】

本章内容为:【常用内置函数】

Python 内置函数



内置函数



​​abs()​​

​​divmod()​​

​​input()​​

​​open()​​

​​staticmethod()​​

​​all()​​

​​enumerate()​​

​​int()​​

​​ord()​​

​​str()​​

​​any()​​

​​eval()​​

​​isinstance()​​

​​pow()​​

​​sum()​​

​​basestring()​​

​​execfile()​​

​​issubclass()​​

​​print()​​

​​super()​​

​​bin()​​

​​file()​​

​​iter()​​

​​property()​​

​​tuple()​​

​​bool()​​

​​filter()​​

​​len()​​

​​range()​​

​​type()​​

​​bytearray()​​

​​float()​​

​​list()​​

​​raw_input()​​

​​unichr()​​

​​callable()​​

​​format()​​

​​locals()​​

​​reduce()​​

unicode()

​​chr()​​

​​frozenset()​​

​​long()​​

​​reload()​​

​​vars()​​

​​classmethod()​​

​​getattr()​​

​​map()​​

​​repr()​​

​​xrange()​​

​​cmp()​​

​​globals()​​

​​max()​​

​​reverse()​​

​​zip()​​

​​compile()​​

​​hasattr()​​

​​memoryview()​​

​​round()​​

​​__import__()​​

​​complex()​​

​​hash()​​

​​min()​​

​​set()​​


​​delattr()​​

​​help()​​

​​next()​​

​​setattr()​​


​​dict()​​

​​hex()​​

object()

​​slice()​​


​​dir()​​

​​id()​​

​​oct()​​

​​sorted()​​

​​exec 内置表达式​​

 常用的一些内置函数演示:

print(abs(-10))#绝对值
print(divmod(7, 2))#商与余数
print(ord("红"))#ASCII码
print(pow(2,10)) #方法返回 xy(x 的 y 次方) 的值。
print(sum([1,2,3,4,5,6,7,8,9]))#方法对序列进行求和计算
print(dir())# 获得当前模块的属性列表
print(dir([]))# 查看列表的方法
print(dir({}))# 查看字典的方法
print(id(1))#查看内存地址
print(oct(8))#十进制转八进制

零基础学Python(第二十二章 常用内置函数)_python

总结:

a)、内置函数还有很多没有一一展示,毕竟很多时候还需要根据具体的业务逻辑进行处理事务。

本课程目录为:

Python初级

1 、开发工具

2 、中文编码

3 、基础语法

4 、变量类型

5 、运算符

6 、条件语句

7 、while循环

8 、for循环

9 、循环控制

10、 循环嵌套

11 、字符串

12 、列表

13 、元组

14、 字典

15 、日期时间

16、 函数

17 、模块

18 、文件I/O

19 、File方法

20 、异常处理

21 、文件目录

22 、内置函数(本章)

【到此,Python的初级内容到此结束,为了提升学习兴趣,下篇文章开始爬取一些网上的内容,先完整之前说的爬个小说。明天开始更新。】

Python爬虫完整学习地址:【​​javascript:void(0)​​】

欢迎【点赞】、【评论】、【关注】、【收藏】,为推广知识贡献力量。


举报

相关推荐

0 条评论