对Python 内建函数和保留字详解


Posted in Python onOctober 15, 2018

保留字:

In [4]: import keyword

In [5]: keyword.kwlist
Out[5]: 
['False',
 'None',
 'True',
 'and',
 'as',
 'assert',
 'break',
 'class',
 'continue',
 'def',
 'del',
 'elif',
 'else',
 'except',
 'finally',
 'for',
 'from',
 'global',
 'if',
 'import',
 'in',
 'is',
 'lambda',
 'nonlocal',
 'not',
 'or',
 'pass',
 'raise',
 'return',
 'try',
 'while',
 'with',
 'yield']

其他可用:

A:

abs
abstractmethod
all
and
any
apply
as
ascii (python3新增)
assert

B:

basestring(python3已删除)
bin
bool
break

buffer(python3已删除)
bytearray
bytes

C:

callable
class
classmethod
compile
complex

D:

def
del
delattr
dict
dir
divmod

E:

elif
else
eval
except
exec
execfile(python3 删除)

F:

filter
finally
float
for
format
from
frozenset

G:

getattr
global
globals

H:

hasattr
hash
help
hex

I:

id
if
import
in
input
int
is
isinstance
isubclass
iter

L:

lambda
len
list
locals

M:

map
max
memoryview
min

N:

next
nonlocal (python3新增)
not

O:

object
oct
open
or
ord

P:

pass
pow
print
property

R:

raise
range
repr
return
reload
reversed
round

S:

set
setattr
slice
sorted
str
sum
super

T:

try
tuple
typle

V:

vars

W:

while
with

X:

xrange (python3 已删除)

Y:

yield

Z:

zip

欢迎补充~

以上这篇对Python 内建函数和保留字详解就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。

Python 相关文章推荐
详解Python中的元组与逻辑运算符
Oct 13 Python
Phantomjs抓取渲染JS后的网页(Python代码)
May 13 Python
Python打包可执行文件的方法详解
Sep 19 Python
Python实现的多线程同步与互斥锁功能示例
Nov 30 Python
快速了解Python相对导入
Jan 12 Python
100行python代码实现跳一跳辅助程序
Jan 15 Python
tensorflow创建变量以及根据名称查找变量
Mar 10 Python
PyQt4实现下拉菜单可供选择并打印出来
Apr 20 Python
pandas 数据归一化以及行删除例程的方法
Nov 10 Python
TensorFlow2.0矩阵与向量的加减乘实例
Feb 07 Python
python GUI库图形界面开发之PyQt5计数器控件QSpinBox详细使用方法与实例
Feb 28 Python
如何使用PyCharm将代码上传到GitHub上(图文详解)
Apr 27 Python
Python 比较文本相似性的方法(difflib,Levenshtein)
Oct 15 #Python
便捷提取python导入包的属性方法
Oct 15 #Python
Django安装配置mysql的方法步骤
Oct 15 #Python
深入理解Django自定义信号(signals)
Oct 15 #Python
使用numba对Python运算加速的方法
Oct 15 #Python
浅谈解除装饰器作用(python3新增)
Oct 15 #Python
python  创建一个保留重复值的列表的补码
Oct 15 #Python
You might like
php strstr查找字符串中是否包含某些字符的查找函数
2010/06/03 PHP
一个PHP的ZIP压缩类分享
2014/05/04 PHP
完善CodeIgniter在IDE中代码提示功能的方法
2014/07/19 PHP
PHP判断来访是搜索引擎蜘蛛还是普通用户的代码小结
2015/09/14 PHP
阿里云Win2016安装Apache和PHP环境图文教程
2018/03/11 PHP
jquerydom对象的事件隐藏显示和对象数组示例
2013/12/10 Javascript
Javascript中call的两种用法实例
2013/12/13 Javascript
使用jQuery判断IE浏览器版本的代码
2014/06/14 Javascript
jQuery简单实现上下,左右滑动的方法
2016/06/01 Javascript
AngularJs中Bootstrap3 datetimepicker使用实例
2016/12/13 Javascript
js中常用的Math方法总结
2017/01/12 Javascript
微信小程序本作用域下调用全局JS详解及实例
2017/02/22 Javascript
angular 用Observable实现异步调用的方法
2018/12/27 Javascript
新手快速入门JavaScript装饰者模式与AOP
2019/06/24 Javascript
JS数组方法shift()、unshift()用法实例分析
2020/01/18 Javascript
如何通过Proxy实现JSBridge模块化封装
2020/10/22 Javascript
python实现马耳可夫链算法实例分析
2015/05/20 Python
在Django中同时使用多个配置文件的方法
2015/07/22 Python
在python3环境下的Django中使用MySQL数据库的实例
2017/08/29 Python
Python 判断 有向图 是否有环的实例讲解
2018/02/01 Python
Python实现的视频播放器功能完整示例
2018/02/01 Python
Python实现的用户登录系统功能示例
2018/02/05 Python
python opencv旋转图像(保持图像不被裁减)
2018/07/26 Python
详解js文件通过python访问数据库方法
2019/03/03 Python
python网络应用开发知识点浅析
2019/05/28 Python
python实现各种插值法(数值分析)
2019/07/30 Python
如何利用Python动态模拟太阳系运转
2020/09/04 Python
美国全球旅游运营商:Pacific Holidays
2018/06/18 全球购物
阿迪达斯印尼官方网站:adidas印尼
2020/02/10 全球购物
工程现场管理求职自荐信
2013/10/02 职场文书
新教师工作感言
2014/02/16 职场文书
户外活动总结范文
2014/04/30 职场文书
银行优秀员工事迹材料
2014/05/29 职场文书
mysql优化
2021/04/06 MySQL
springboot入门 之profile设置方式
2022/04/04 Java/Android
Docker部署Mysql8的实现步骤
2022/07/07 Servers