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.

F-Strings

Formatted string literals — format specs, alignment, padding, conversion flags, and debug mode.

Input and Output

input() always returns a string, and print() has three parameters worth knowing — sep, end, and the values themselves.

Values and Types

Every Python value carries its type. How to ask what that type is, and what happens when you convert between them.

Variables and Naming

What makes a Python identifier legal, the 35 reserved keywords, and the PEP 8 conventions on top.