// resources
Resources
All
|
Cheatsheet
Code Example
Exercise
Template
Other
Achievement
|
Basics
Control Flow
Functions
Data Structures
Modules & Packages
Projects
Object-oriented programming
|
↑ oldest first
↓ newest first
// Code Example
logical_operators.py
and, or, not — three operators, endless logic. Truth tables, real examples, and combining conditions.
// Code Example
in_operator.py
One word. One answer. See how in and not in work — with strings, case sensitivity, and real examples.
// Code Example
type_conversion.py
int(), float(), str(), bool() — switch between types with confidence. With real examples and what not to try.
// Code Example
print_advanced.py
f-strings with format specs — floats, alignment, thousands separators, percentages. Your output, fully under control.
// Code Example
if_statement.py
if statement — comparison operators, True/False conditions, real use cases. Your code runs only when it should.
// Code Example
else_statement.py
if / else — the fallback that guarantees one block always runs. Every decision, both sides covered.
// Code Example
elif_statement.py
elif — chain multiple conditions, first match wins. Order matters, most specific goes first.
// Code Example
ternary_operator.py
Ternary operator — if / else compressed to one line. Syntax, examples, common mistakes, and when to use the full form i…
// Code Example
for_loops.py
for loops — iterating over strings, updating variables with +=, and understanding len(). Write it once, the loop handle…
// Code Example
range_function.py
range() — stop, start/stop, step, counting backwards, and combining with len(). Tell Python the boundaries, it handles …
// Code Example
loop_counter.py
Loop counter — +=, -=, *= inside a loop. Define before, update inside, use after. Track everything that happens iterati…
// Code Example
enumerate_function.py
enumerate() — position and value on every iteration. No counter, no manual increment. Unpack and use.
// Code Example
zip_function.py
zip() — two sequences, one loop. Items matched by position, stops at the shortest. No counter needed.
// Code Example
pass_statement.py
pass — the statement that does nothing, intentionally. A placeholder that keeps Python satisfied while you're not ready…
// Code Example
continue_statement.py
continue — skips the rest of the current iteration and moves to the next. The loop never stops, it just moves on.