This book is a short, introductory guide for those already familiar with programming basics. Visit https://youtu.be/aoWJzaSs0cs for a short video about the book.
The book also includes exercises to test your understanding, which are presented together as a single file in this repo — Exercises.md.
You can also use this interactive TUI app to practice some of the exercises from the book.
See Version_changes.md to keep track of changes made to the book.
- You can purchase the pdf/epub versions of the book using these links:
- You can also get the book as part of these bundles:
- All books bundle bundle from https://leanpub.com/b/learnbyexample-all-books or https://learnbyexample.gumroad.com/l/all-books
- Learn by example Python bundle from https://leanpub.com/b/python-bundle or https://learnbyexample.gumroad.com/l/python-bundle
- See https://learnbyexample.github.io/books/ for a list of other books
For a preview of the book, see sample chapters.
The book can also be viewed as a single markdown file in this repo. See my blogpost on generating pdf/epub from markdown using pandoc if you are interested in the ebook creation process.
For the web version of the book, visit https://learnbyexample.github.io/100_page_python_intro/
It's very thorough, written with care, and presented in a way that makes sense. Even as an intermediate Python programmer, I found use in this book.
— feedback by Andrew Healey on Hacker News
I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.
You can reach me via:
- Issue Manager: https://github.com/learnbyexample/100_page_python_intro/issues
- E-mail:
echo 'bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=' | base64 --decode
- Twitter: https://twitter.com/learn_byexample
- Preface
- Introduction
- Numeric data types
- Strings and user input
- Defining functions
- Control structures
- Importing and creating modules
- Installing modules and Virtual environments
- Exception handling
- Debugging
- Testing
- Tuple and Sequence operations
- List
- Mutability
- Dict
- Set
- Text processing
- Comprehensions and Generator expressions
- Dealing with files
- Executing external commands
- Command line arguments
- Official Python website — documentation and examples
- stackoverflow and unix.stackexchange — for getting answers to pertinent questions on Python, Shell and programming in general
- /r/learnpython and /r/learnprogramming — helpful forum for beginners
- /r/Python/ — general Python discussion
- tex.stackexchange — for help on pandoc and
tex
related questions - canva — cover image
- oxipng, pngquant and svgcleaner — optimizing images
- Warning and Info icons by Amada44 under public domain
- Dean Clark and Elijah for catching a few typos
- mdBook — for web version of the book
- mdBook-pagetoc — for adding table of contents for each chapter
- minify-html — for minifying html files
The book is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The code snippets are licensed under MIT, see LICENSE file.