Python – Keywords (more diff.)

 0    23 fiche    sir
ladda ner mp3 skriva ut spela Kontrollera dig själv
 
Fråga Svar
To create an alias
börja lära sig
as
For debugging
börja lära sig
assert
To break out of a loop
börja lära sig
break
To define a class
börja lära sig
class
To continue to the next iteration of a loop
börja lära sig
continue
To define a function
börja lära sig
def
To delete an object
börja lära sig
del
Used with exceptions, what to do when an exception occurs
börja lära sig
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
börja lära sig
finally
To import specific parts of a module
börja lära sig
from
To declare a global variable
börja lära sig
global
To import a module
börja lära sig
import
To check if a value is present in a list, tuple, etc.
börja lära sig
in
To test if two variables refer to the same memory space.
börja lära sig
is
To create an anonymous function
börja lära sig
lambda
To declare a non-local variable
börja lära sig
nonlocal
A null statement, a statement that will do nothing
börja lära sig
pass
To raise an exception
börja lära sig
raise
To exit a function and return a value
börja lära sig
return
To make a try... except statement
börja lära sig
try
To create a while loop
börja lära sig
while
Used to simplify file handling
börja lära sig
with
To end a function, returns a generator
börja lära sig
yield

Du måste vara inloggad för att skriva en kommentar.