Python – Keywords (more diff.)

 0    23 flashcards    sir
tải về mp3 In chơi tự kiểm tra
 
câu hỏi câu trả lời
To create an alias
bắt đầu học
as
For debugging
bắt đầu học
assert
To break out of a loop
bắt đầu học
break
To define a class
bắt đầu học
class
To continue to the next iteration of a loop
bắt đầu học
continue
To define a function
bắt đầu học
def
To delete an object
bắt đầu học
del
Used with exceptions, what to do when an exception occurs
bắt đầu học
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
bắt đầu học
finally
To import specific parts of a module
bắt đầu học
from
To declare a global variable
bắt đầu học
global
To import a module
bắt đầu học
import
To check if a value is present in a list, tuple, etc.
bắt đầu học
in
To test if two variables refer to the same memory space.
bắt đầu học
is
To create an anonymous function
bắt đầu học
lambda
To declare a non-local variable
bắt đầu học
nonlocal
A null statement, a statement that will do nothing
bắt đầu học
pass
To raise an exception
bắt đầu học
raise
To exit a function and return a value
bắt đầu học
return
To make a try... except statement
bắt đầu học
try
To create a while loop
bắt đầu học
while
Used to simplify file handling
bắt đầu học
with
To end a function, returns a generator
bắt đầu học
yield

Bạn phải đăng nhập để đăng bình luận.