Python CoreNot Started
Python Syntax
Indentation, f-strings, list/dict comprehensions, unpacking
0%
Knowledge Debt detected
You can study this freely — but your score may plateau if these foundations have gaps. The Mastery badge requires them to be solid.
Explanation
Python has unique syntax features that distinguish it from other languages.
Indentation defines code blocks (no braces needed). f-strings make string formatting readable: ``python name = "Alice" print(f"Hello, {name}!") # Hello, Alice!
List comprehensions — concise loops: ``python squares = [x**2 for x in range(5)] # [0, 1, 4, 9, 16]
Unpacking:
python a, b, c = [1, 2, 3] first, *rest = [1, 2, 3, 4, 5]
Examples
Dict comprehension
Build a dict from a list in one line
words = ["apple", "bat", "cherry"]
lengths = {w: len(w) for w in words}
print(lengths) # {'apple': 5, 'bat': 3, 'cherry': 6}Next in Python Core
Exceptions & Error Handling