Languages
Python 3 Cheat Sheet
Print-ready cheat sheet for Python 3, organized for fast lookup, study, and desk-side use
Sample
What's in this cheat sheet
- Basics
- Strings
- Lists
- Tuples & Sets
- Dictionaries
- Control Flow
- Loops
- Functions
- Classes
- Error Handling
- File I/O
- CSV
- JSON
- HTTP Requests
- pandas Basics
- Useful Built-ins
- Modules
Variables
name = "Alice" # str
age = 20 # int
gpa = 3.85 # float
active = True # bool
Data Types
str | Text: `"hello"` |
int | Integer: `42` |
float | Decimal: `3.14` |
bool | `True` / `False` |
list | Ordered, mutable: `[1, 2, 3]` |
tuple | Ordered, immutable: `(1, 2)` |
dict | Key-value: `{"a": 1}` |
set | Unique items: `{1, 2, 3}` |
Arithmetic
+ - * | Add, subtract, multiply |
/ | Division (float): 7/2 → 3.5 |
// | Floor division: 7//2 → 3 |
% | Modulo: 7%2 → 1 |
** | Power: 2**3 → 8 |
Download the full cheat sheet for all sections, formatted for print
Download PDFDownloads
Choose the treatment that matches how you read
-
Recommended
Standard
B&W, ink-efficient. The default for laser printers and photocopies
Best for Printouts and desk-side reference
-
Color
Warm color accents for on-screen reading or color printers
Best for Screen reading or color printers
-
Reference Card
Maximum density, 4-column layout. Everything on one page
Best for Fast scanning and minimum paper use