對Python 內建函數和保留字詳解
更新時間:2018年10月15日 15:08:19 作者:曉東邪
今天小編就為大家分享一篇對Python 內建函數和保留字詳解,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
保留字:
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常見庫matplotlib學習筆記之畫圖中各個模塊的含義及修改方法
matplotlib是python最著名的繪圖庫,它提供了一整套和matlab相似的命令API,十分適合交互式地進行制圖,下面這篇文章主要給大家介紹了關于Python常見庫matplotlib學習筆記之畫圖中各個模塊的含義及修改方法的相關資料,需要的朋友可以參考下2023-05-05termux中matplotlib無法顯示中文問題的解決方法
這篇文章主要介紹了termux中matplotlib無法顯示中文問題的解決方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2021-01-01