Python – Keywords (more diff.)

 0    23 fiche    sir
Télécharger mP3 Imprimer jouer consultez
 
question réponse
To create an alias
commencer à apprendre
as
For debugging
commencer à apprendre
assert
To break out of a loop
commencer à apprendre
break
To define a class
commencer à apprendre
class
To continue to the next iteration of a loop
commencer à apprendre
continue
To define a function
commencer à apprendre
def
To delete an object
commencer à apprendre
del
Used with exceptions, what to do when an exception occurs
commencer à apprendre
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
commencer à apprendre
finally
To import specific parts of a module
commencer à apprendre
from
To declare a global variable
commencer à apprendre
global
To import a module
commencer à apprendre
import
To check if a value is present in a list, tuple, etc.
commencer à apprendre
in
To test if two variables refer to the same memory space.
commencer à apprendre
is
To create an anonymous function
commencer à apprendre
lambda
To declare a non-local variable
commencer à apprendre
nonlocal
A null statement, a statement that will do nothing
commencer à apprendre
pass
To raise an exception
commencer à apprendre
raise
To exit a function and return a value
commencer à apprendre
return
To make a try... except statement
commencer à apprendre
try
To create a while loop
commencer à apprendre
while
Used to simplify file handling
commencer à apprendre
with
To end a function, returns a generator
commencer à apprendre
yield

Vous devez vous connecter pour poster un commentaire.