All Keywords in Python language.
as is used to create an alias while importing a module. It means giving a different name (user-defined) to a module while importing it.
assert is used for debugging purposes
break and continue
True and False
True and False are truth values in Python. They are the results of comparison operations or logical (Boolean) operations in Python.
None is a special constant in Python that represents the absence of a value or a null value
and, or, not
and, or, not are the logical operators in Python
class is used to define a new user-defined class in Python
def is used to define a user-defined function
del is used to delete the reference to an object
if, else, elif
if, else, elif are used for conditional branching or decision making
except, raise, try
except, raise, and try are used with exceptions in Python
finally is used with block to close up resources or file streams
global is used to declare that a variable ‘inside the function is global
is used in Python for testing object identity
return statement is used inside a function to exit it and return a value
while is used for looping in Python
for is used for looping. Generally, we use for when we know the number of times we want to loop.
from and import
import keyword is used to import modules into the current namespace. is used to import specific attributes or functions into the current namespace
with statement is used to wrap the execution of a block of code within methods defined by the context manager
yield is used inside a function like a return statement. But yield returns a generator