None
: Represents null/empty value (x = None)True
: Boolean true value (x = True)False
: Boolean false value (x = False)and
: Logical AND operator (if x > 0 and y > 0:)or
: Logical OR operator (if x > 0 or y > 0:)not
: Logical NOT operator (if not x):in
: Membership test operator (if x in list:)is
: Identity comparison (if x is None:)if
: Conditional statement (if x > 0:)elif
: Else if condition (elif x < 0:)else
: Default condition (else:)for
: For loop (for x in list:)while
: While loop (while condition:)break
: Exit loop (break)continue
: Skip to next iteration (continue)pass
: Null operation placeholder (pass)try
: Begin exception handling block (try:)except
: Handle specific exceptions (except ValueError:)finally
: Always executed block (finally:)raise
: Raise an exception (raise ValueError("Invalid input"))assert
: Debug assertion (assert x > 0, "x must be positive")def
: Define function (def my_function():)class
: Define class (class MyClass:)return
: Return value from function (return result)yield
: Generator yield (yield value)lambda
: Anonymous function (lambda x: x * 2)global
: Declare global variable (global counter)nonlocal
: Declare nonlocal variable (nonlocal outer_var)import
: Import module (import math)from
: Import specific items (from math import sqrt)as
: Alias for imports (import numpy as np)async
: Define async function (async def fetch_data():)await
: Wait for async operation (result = await fetch_data())del
: Delete object reference (del my_variable)with
: Context manager (with open('file.txt') as f:)