Welcome to Python 101!¶
Learn how to program with Python 3 from beginning to end. Python 101 starts off with the fundamentals of Python and then builds onto what you’ve learned from there. The audience of this book is primarily people who have programmed in the past but want to learn Python. This book covers a fair amount of intermediate level material in addition to the beginner material.
To cover all this information, the book is split into five parts.
The first part is the beginner section. In it you will learn all the basics of Python. From Python types (strings, lists, dictionaries) to conditional statements to loops. You will also learn about comprehensions, functions and classes and everything in between!
This section will be a curated tour of the Python Standard Library. The intent isn’t to cover everything in it, but instead it is to show the reader that you can do a lot with Python right out of the box. We’ll be covering the modules I find the most useful in day-to-day programming tasks, such as os, sys, logging, threads, and more.
An all intermediate section covering lambda, decorators, properties, debugging, testing and profiling.
Now things get really interesting! In part four, we will be learning how to install 3rd party libraries (i.e. packages) from the Python Package Index and other locations. We will cover easy_install and pip. This section will also be a series of tutorials where you will learn how to use the packages you download. For example, you will learn how to download a file, parse XML, use an Object Relational Mapper to work with a database, etc.
The last section of the book will cover how to share your code with your friends and the world! You will learn how to package it up and share it on the Python Package Index (i.e. how to create an egg or wheel). You will also learn how to create executables using py2exe, bb_freeze, cx_freeze and PyInstaller. Finally you will learn how to create an installer using Inno Setup.
Purchase the Book¶
The book has also been made into a course on Educative where you will be able to run the examples. You can find it here. If you’d like to get a price break, you can use the following coupon: au-py101-interactive at checkout on Educative.
Start Reading Python 101¶
- Part I - Learning the Basics
- Chapter 1 - IDLE Programming
- Chapter 2 - All About Strings
- Chapter 3 - Lists, Tuples and Dictionaries
- Chapter 4 - Conditional Statements
- Chapter 5 - Loops
- Chapter 6 - Python Comprehensions
- Chapter 7 - Exception Handling
- Chapter 8 - Working with Files
- Chapter 9 - Importing
- Chapter 10 - Functions
- Chapter 11 - Classes
- Part II - Learning from the Library
- Chapter 12 - Introspection
- Chapter 13 - The csv Module
- Chapter 14 - configparser
- Chapter 15 - Logging
- Chapter 16 - The os Module
- Chapter 17 - The email / smtplib Module
- Chapter 18 - The sqlite Module
- Chapter 19 - The subprocess Module
- Chapter 20 - The sys Module
- Chapter 21 - The threading module
- Chapter 22 - Working with Dates and Time
- Chapter 23 - The xml module
- Part III - Intermediate Odds and Ends
- Chapter 24 - The Python Debugger
- Chapter 25 - Decorators
- Chapter 26 - The lambda
- Chapter 27 - Code Profiling
- Chapter 28 - An Intro to Testing
- Part IV - Tips, Tricks and Tutorials
- Chapter 29 - Installing Packages
- Chapter 30 - ConfigObj
- Chapter 31 - Parsing XML with lxml
- Chapter 32 - Python Code Analysis
- Chapter 33 - The requests package
- Chapter 34 - SQLAlchemy
- Chapter 35 - virtualenv
- Part V - Packaging and Distribution
- Chapter 36 - Creating Modules and Packages
- Chapter 37 - How to Add Your Code to PyPI
- Chapter 38 - The Python egg
- Chapter 39 - Python wheels
- Chapter 40 - py2exe
- Chapter 41 - bbfreeze
- Chapter 42 - cx_Freeze
- Chapter 43 - PyInstaller
- Chapter 44 - Creating an Installer