Python – Keywords (more diff.)

 0    23 fiche    sir
laste ned mp3 Skriv ut spille sjekk deg selv
 
spørsmålet svaret
To create an alias
begynn å lære
as
For debugging
begynn å lære
assert
To break out of a loop
begynn å lære
break
To define a class
begynn å lære
class
To continue to the next iteration of a loop
begynn å lære
continue
To define a function
begynn å lære
def
To delete an object
begynn å lære
del
Used with exceptions, what to do when an exception occurs
begynn å lære
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
begynn å lære
finally
To import specific parts of a module
begynn å lære
from
To declare a global variable
begynn å lære
global
To import a module
begynn å lære
import
To check if a value is present in a list, tuple, etc.
begynn å lære
in
To test if two variables refer to the same memory space.
begynn å lære
is
To create an anonymous function
begynn å lære
lambda
To declare a non-local variable
begynn å lære
nonlocal
A null statement, a statement that will do nothing
begynn å lære
pass
To raise an exception
begynn å lære
raise
To exit a function and return a value
begynn å lære
return
To make a try... except statement
begynn å lære
try
To create a while loop
begynn å lære
while
Used to simplify file handling
begynn å lære
with
To end a function, returns a generator
begynn å lære
yield

Du må logge inn for å legge inn en kommentar.