Python – Keywords (more diff.)

 0    23 speciālā zīme    sir
lejupielādēt mp3 Drukāt spēlēt pārbaudiet sevi
 
jautājums atbilde
To create an alias
sākt mācīties
as
For debugging
sākt mācīties
assert
To break out of a loop
sākt mācīties
break
To define a class
sākt mācīties
class
To continue to the next iteration of a loop
sākt mācīties
continue
To define a function
sākt mācīties
def
To delete an object
sākt mācīties
del
Used with exceptions, what to do when an exception occurs
sākt mācīties
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
sākt mācīties
finally
To import specific parts of a module
sākt mācīties
from
To declare a global variable
sākt mācīties
global
To import a module
sākt mācīties
import
To check if a value is present in a list, tuple, etc.
sākt mācīties
in
To test if two variables refer to the same memory space.
sākt mācīties
is
To create an anonymous function
sākt mācīties
lambda
To declare a non-local variable
sākt mācīties
nonlocal
A null statement, a statement that will do nothing
sākt mācīties
pass
To raise an exception
sākt mācīties
raise
To exit a function and return a value
sākt mācīties
return
To make a try... except statement
sākt mācīties
try
To create a while loop
sākt mācīties
while
Used to simplify file handling
sākt mācīties
with
To end a function, returns a generator
sākt mācīties
yield

Lai ievietotu komentāru, jums jāpiesakās.