Python – Keywords (more diff.)

 0    23 词汇卡    sir
下载mp3 打印 检查自己
 
问题 答案
To create an alias
开始学习
as
For debugging
开始学习
assert
To break out of a loop
开始学习
break
To define a class
开始学习
class
To continue to the next iteration of a loop
开始学习
continue
To define a function
开始学习
def
To delete an object
开始学习
del
Used with exceptions, what to do when an exception occurs
开始学习
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
开始学习
finally
To import specific parts of a module
开始学习
from
To declare a global variable
开始学习
global
To import a module
开始学习
import
To check if a value is present in a list, tuple, etc.
开始学习
in
To test if two variables refer to the same memory space.
开始学习
is
To create an anonymous function
开始学习
lambda
To declare a non-local variable
开始学习
nonlocal
A null statement, a statement that will do nothing
开始学习
pass
To raise an exception
开始学习
raise
To exit a function and return a value
开始学习
return
To make a try... except statement
开始学习
try
To create a while loop
开始学习
while
Used to simplify file handling
开始学习
with
To end a function, returns a generator
开始学习
yield

您必须登录才能发表评论。