Python continue |
Skips the current iteration of a loop. |
Python del keyword |
Deletes an object or variable. |
Python elif statement |
Used in conditional statements; short for “else if”. |
Python else keyword |
Specifies code to run when a condition is false. |
Python except keyword |
Handles exceptions in a try-except block. |
Python False keyword |
Boolean value representing false. |
Python finally keyword |
Defines cleanup code to run after try or except. |
Python for loop |
Used to iterate over sequences like lists, tuples, etc. |
Python from keyword |
Used in import statements to specify modules. |
Python global keyword |
Declares a variable as global. |
Python if statement |
Used for conditional branching. |
Python import |
Imports modules into the current namespace. |
Python in keyword |
Checks if a value exists in a sequence. |
Python is keyword |
Checks if two objects are the same. |
Python lambda |
Creates small anonymous functions. |
Python None |
Represents a null or no-value object. |
Python nonlocal |
Refers to variables in an enclosing scope. |
Python not |
Logical NOT operator to invert conditions. |
Python or keyword |
Logical OR operator for combining conditions. |
Python pass keyword |
A null statement; does nothing. |
Python raise |
Raises an exception. |
Python return |
Returns a value from a function. |
Python True |
Boolean value representing true. |
Python try keyword |
Starts a try block to catch exceptions. |
Python while loop |
Used to create loops that run while a condition is true. |
Python with keyword |
Simplifies exception handling in file operations. |
Python yield keyword |
Pauses and resumes a generator function. |