Skip to content

Keyboard shortcuts

Go home G then H
Browse sets G then B
Create set G then C
My library G then L
Show shortcuts ?
Go back Swipe from left edge

Coding — Python Basics

Core Python syntax and built-in features

P
py_thon_fan 15 terms Mar 11, 2026
Flashcards
Learn
Written
Match
Test
Blitz

Terms 15

1
List
Ordered, mutable sequence: [1, 2, 3]; supports indexing and slicing
2
Tuple
Ordered, immutable sequence: (1, 2, 3); faster than lists
3
Dictionary
Key-value store: {'key': 'value'}; O(1) average lookup
4
Set
Unordered collection of unique elements: {1, 2, 3}
5
List Comprehension
[expr for item in iterable if condition]; concise list creation
6
Lambda
Anonymous one-line function: lambda x: x * 2
7
*args
Allows function to accept variable number of positional arguments
8
**kwargs
Allows function to accept variable number of keyword arguments
9
Decorator
Function that wraps another function to extend its behavior; uses @syntax
10
Generator
Function using yield to produce values lazily; memory efficient
11
try/except
Error handling block; catches exceptions and runs fallback code
12
with statement
Context manager ensuring proper resource cleanup; e.g. file handling
13
f-string
String formatting: f'Hello {name}'; cleaner than .format()
14
None
Python's null value; absence of a value; falsy
15
PEP 8
Python's official style guide; 4-space indents, snake_case naming