Skip to main content

6 docs tagged with "Basics"

Language fundamentals — the things everything else builds on.

View all tags

Data Types

Python's four scalar and four collection types—int, float, str, bool, list, tuple, dict, set—mutability, ordering, and hashability.

Expressions and Operators

Arithmetic operators, strict float division, right-to-left exponentiation, PEMDAS precedence, and structuring computations.

F-Strings

Formatted string literals, precision specifiers, alignment padding, conversion flags, and debug mode.

Input and Output

User input streams via input(), why input always returns a string, and custom print formatting with sep and end parameters.

Values and Types

Every Python value carries its type. How to inspect types, understand memory references, and navigate casting and truthiness traps.

Variables and Naming

What makes a Python identifier legal, the 35 reserved keywords, the danger of shadowing built-ins, and PEP 8 conventions.