Python Variables Explained
Understand what Python variables are, how they store and reference data, and why Python's variable model is different from other programming languages.
Learn Python programming from scratch
Understand what Python variables are, how they store and reference data, and why Python's variable model is different from other programming languages.
Learn how Python integers work, including unlimited precision, arithmetic operations, integer literals in different bases, and common integer methods.
Learn how Python floats work with IEEE 754 double precision, why 0.1 + 0.2 is not exactly 0.3, and how to handle floating-point arithmetic correctly.
Learn how Python booleans work as a subclass of integers, how truthiness evaluates any value, and how to use boolean logic in conditions and expressions.
Learn how Python's None singleton represents the absence of a value, when to use None as a default, and how to check for None correctly with the is operator.
Learn how Python's built-in complex number type represents values with real and imaginary parts, how to perform arithmetic, and when to use the cmath module.
Learn the most frequently used Python string operations including concatenation, repetition, membership testing, and length checking with practical examples.
Learn how to use Python f-strings to embed expressions directly inside string literals for clean, fast, and readable string formatting.
Learn how to use escape characters in Python strings to include quotes, newlines, tabs, backslashes, and Unicode characters that cannot be typed directly.
Learn how to create multiline strings in Python using triple quotes, how Python handles line breaks, and when to use multiline strings for docstrings and text blocks.
Learn how to split strings into lists and join lists into strings using Python's split() and join() methods with practical examples.
Learn how to strip whitespace from Python strings using strip(), lstrip(), rstrip(), and how to handle user input and file data cleanly.