Getting Started with Python
Installing Python, running your first script, using the interactive shell, and understanding Python's design philosophy.
A hands-on guide to learning Python from scratch. Covers variables, control flow, functions, data structures, OOP, file I/O, modules, error handling, and popular libraries — with interactive quizzes at every stage.
Installing Python, running your first script, using the interactive shell, and understanding Python's design philosophy.
Variables, naming rules, integers, floats, strings, booleans, arithmetic, comparison, and logical operators.
Conditional statements (if/elif/else), for loops, while loops, range(), break, continue, and the match statement.
Defining functions, parameters and arguments, return values, scope, lambda functions, and docstrings.
Lists, tuples, sets, dictionaries, list comprehensions, and when to use each data structure.
String methods, f-strings, string formatting, reading and writing files, the with statement, and working with CSV data.
Classes and objects, instance attributes, methods, inheritance, dunder methods, and properties.
The import system, standard library highlights, creating your own modules, pip, and virtual environments.
Exceptions, try/except/else/finally, raising exceptions, creating custom exceptions, and debugging techniques.
Popular third-party libraries, project structure, writing idiomatic Python, and resources for continued learning.
Chapter quizzes (3 questions each), a mid-book quiz (5 questions), and a final quiz (20 questions).