// 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
hello.py
Your first Python script. One instruction. One result. That's how it starts.
// Code Example
variables.py
See how labels work in practice. Change a value — watch everything update.
// Code Example
strings_basics.py
Text is data. See how strings work in practice — quotes, concatenation, and why "25" is not the same as 25.
// Code Example
strings_indexing.py
Every character has a position. See how indexes work — from zero to negative.
// Code Example
strings_slicing.py
Take exactly the piece you need. All slicing variations in one file.
// Code Example
strings_methods_1.py
Your string's basic toolkit in action. len, upper, lower, strip, replace — with examples and chaining.
// Code Example
strings_methods_2.py
Search, split, and rebuild. See how in, find, count, startswith, split, and join work in practice.
// Code Example
data_types.py
Not all values are the same. See the four basic types in action — str, int, float, bool — and why type() is your best f…
// Code Example
print_formatting.py
Your output, your rules. sep, end, and f-strings — everything you need to print clean, structured results.
// Code Example
input_basics.py
Your program is listening. See how input() works — from basic text to numbers and a real age calculator.
// Code Example
numbers_basics.py
int or float — Python decides. See how numbers work, how types are assigned, and why "25" is not 25.
// Code Example
arithmetic.py
All basic arithmetic operators in one file. With variables, order of operations, and why division always returns a floa…
// Code Example
int_vs_float.py
Same value, different type. See how int and float behave differently — division, conversion, mixing, and the float prec…
// Code Example
math_module.py
sqrt, floor, ceil, pi, pow, round — the math module and built-ins in one file. Your first import, explained.
// Code Example
bool_basics.py
True or False — that's it. See how bool works, how comparison operators return bools, and why == and = are not the same.