Python – Keywords (more diff.)

 0    23 informačný list    sir
stiahnuť mp3 vytlačiť hrať Skontrolujte sa
 
otázka Odpoveď
To create an alias
začať sa učiť
as
For debugging
začať sa učiť
assert
To break out of a loop
začať sa učiť
break
To define a class
začať sa učiť
class
To continue to the next iteration of a loop
začať sa učiť
continue
To define a function
začať sa učiť
def
To delete an object
začať sa učiť
del
Used with exceptions, what to do when an exception occurs
začať sa učiť
except
Used with exceptions, a block of code that will be executed no matter if there is an exception or not
začať sa učiť
finally
To import specific parts of a module
začať sa učiť
from
To declare a global variable
začať sa učiť
global
To import a module
začať sa učiť
import
To check if a value is present in a list, tuple, etc.
začať sa učiť
in
To test if two variables refer to the same memory space.
začať sa učiť
is
To create an anonymous function
začať sa učiť
lambda
To declare a non-local variable
začať sa učiť
nonlocal
A null statement, a statement that will do nothing
začať sa učiť
pass
To raise an exception
začať sa učiť
raise
To exit a function and return a value
začať sa učiť
return
To make a try... except statement
začať sa učiť
try
To create a while loop
začať sa učiť
while
Used to simplify file handling
začať sa učiť
with
To end a function, returns a generator
začať sa učiť
yield

Ak chcete pridať komentár, musíte byť prihlásený.