Python cheatsheet
Syntax snippets and quick notes for revision.
Python Introduction
items = ["Python Introduction", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this python introduction pattern when a Python task needs a small, readable starting point.
Syntax
items = ["Syntax", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this syntax pattern when a Python task needs a small, readable starting point.
Variables
items = ["Variables", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this variables pattern when a Python task needs a small, readable starting point.
Data Types
items = ["Data Types", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this data types pattern when a Python task needs a small, readable starting point.
Strings
items = ["Strings", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this strings pattern when a Python task needs a small, readable starting point.
Lists
items = ["Lists", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this lists pattern when a Python task needs a small, readable starting point.
Tuples
items = ["Tuples", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this tuples pattern when a Python task needs a small, readable starting point.
Sets
items = ["Sets", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this sets pattern when a Python task needs a small, readable starting point.
Dictionaries
items = ["Dictionaries", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this dictionaries pattern when a Python task needs a small, readable starting point.
Conditions
items = ["Conditions", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this conditions pattern when a Python task needs a small, readable starting point.
Loops
items = ["Loops", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this loops pattern when a Python task needs a small, readable starting point.
Functions
items = ["Functions", "practice", "review"]
for position, item in enumerate(items, start=1):
print(f"{position}. {item}")Use this functions pattern when a Python task needs a small, readable starting point.