Top Related Projects
Python Data Science Handbook: full text in Jupyter Notebooks
Python best practices guidebook, written for humans.
120+ interactive Python coding interview challenges (algorithms and data structures). Includes Anki flashcards.
All Algorithms implemented in Python
A collection of design patterns/idioms in Python
An opinionated list of awesome Python frameworks, libraries, software and resources.
Quick Overview
Practical Python Programming is a comprehensive course designed to teach Python programming to beginners and intermediate learners. It covers fundamental concepts, data structures, object-oriented programming, and practical applications, providing a solid foundation for Python development.
Pros
- Comprehensive curriculum covering essential Python concepts
- Hands-on approach with numerous exercises and projects
- Clear and well-structured course materials
- Free and open-source, accessible to all learners
Cons
- May be too basic for advanced Python developers
- Limited coverage of more advanced topics like web development or data science
- Requires self-discipline and motivation for self-paced learning
- Some materials may become outdated over time without regular updates
Getting Started
-
Clone the repository:
git clone https://github.com/dabeaz-course/practical-python.git
-
Navigate to the course directory:
cd practical-python
-
Start with the
Notes/Contents.md
file to get an overview of the course structure. -
Begin with Section 1 and work through the course materials, exercises, and projects in order.
-
Use a Python interpreter (version 3.6 or later recommended) to practice the code examples and complete the exercises.
Competitor Comparisons
Python Data Science Handbook: full text in Jupyter Notebooks
Pros of PythonDataScienceHandbook
- Comprehensive coverage of data science topics, including NumPy, Pandas, Matplotlib, and machine learning
- Interactive Jupyter notebooks for hands-on learning and experimentation
- In-depth explanations with visualizations and real-world examples
Cons of PythonDataScienceHandbook
- Focuses primarily on data science, which may not be suitable for general-purpose Python programming
- More complex and advanced content, potentially overwhelming for beginners
- Larger repository size due to extensive notebooks and datasets
Code Comparison
PythonDataScienceHandbook (Data manipulation with Pandas):
import pandas as pd
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
result = df.groupby('A').sum()
practical-python (Basic data processing):
data = [{'name': 'Alice', 'age': 25}, {'name': 'Bob', 'age': 30}]
ages = [person['age'] for person in data]
average_age = sum(ages) / len(ages)
The PythonDataScienceHandbook example demonstrates more advanced data manipulation using Pandas, while practical-python focuses on basic Python data structures and operations.
Python best practices guidebook, written for humans.
Pros of python-guide
- More comprehensive coverage of Python ecosystem, including best practices and tools
- Regularly updated with contributions from a larger community
- Includes sections on deployment, web development, and scientific Python
Cons of python-guide
- Less structured learning path for beginners
- May be overwhelming for those new to Python due to its breadth of topics
- Lacks hands-on exercises and projects for practical application
Code Comparison
practical-python:
def portfolio_cost(filename):
total_cost = 0.0
with open(filename, 'rt') as f:
for line in f:
fields = line.split(',')
nshares = int(fields[1])
price = float(fields[2])
total_cost += nshares * price
return total_cost
python-guide:
import requests
def get_weather(api_key, location):
url = f"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={api_key}"
response = requests.get(url)
return response.json()
The code examples highlight the different focus areas of each repository. practical-python emphasizes fundamental programming concepts and data manipulation, while python-guide showcases real-world applications and integration with external services.
120+ interactive Python coding interview challenges (algorithms and data structures). Includes Anki flashcards.
Pros of interactive-coding-challenges
- Offers a wide range of coding challenges covering various topics
- Includes interactive Jupyter notebooks for hands-on practice
- Provides comprehensive test cases and solutions for each challenge
Cons of interactive-coding-challenges
- May be overwhelming for beginners due to the breadth of topics covered
- Lacks a structured learning path or course-like progression
- Focuses more on algorithmic challenges rather than practical Python applications
Code Comparison
practical-python:
def portfolio_cost(filename):
total_cost = 0.0
with open(filename, 'rt') as f:
for line in f:
fields = line.split()
nshares = int(fields[1])
price = float(fields[2])
total_cost += nshares * price
return total_cost
interactive-coding-challenges:
class Stack(object):
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
The code snippets demonstrate the different focus areas of each repository. practical-python emphasizes practical file handling and data processing, while interactive-coding-challenges concentrates on implementing data structures and algorithms.
All Algorithms implemented in Python
Pros of Python
- Extensive collection of algorithms and data structures
- Well-organized repository with clear categorization
- Active community with frequent contributions and updates
Cons of Python
- Lacks structured learning path or course-like format
- May be overwhelming for beginners due to its vast scope
- Focuses primarily on algorithms rather than practical application
Code Comparison
practical-python:
def portfolio_cost(filename):
total_cost = 0.0
with open(filename, 'rt') as f:
for line in f:
fields = line.split()
nshares = int(fields[1])
price = float(fields[2])
total_cost += nshares * price
return total_cost
Python:
def binary_search(arr, x):
low = 0
high = len(arr) - 1
while low <= high:
mid = (low + high) // 2
if arr[mid] < x:
low = mid + 1
elif arr[mid] > x:
high = mid - 1
else:
return mid
return -1
Summary
practical-python offers a structured course on practical Python programming, ideal for beginners and those seeking hands-on experience. Python provides a comprehensive collection of algorithms and data structures, better suited for those interested in computer science concepts and algorithm implementation. While practical-python focuses on real-world applications, Python emphasizes theoretical understanding and algorithm efficiency.
A collection of design patterns/idioms in Python
Pros of python-patterns
- Focuses on design patterns, providing a comprehensive collection of Python implementations
- Includes both creational, structural, and behavioral patterns
- Offers real-world examples and use cases for each pattern
Cons of python-patterns
- Less structured as a course, may be challenging for beginners
- Lacks in-depth explanations of Python fundamentals
- Not regularly updated, some patterns may use outdated Python syntax
Code Comparison
python-patterns (Strategy pattern):
class Order:
def __init__(self, price, discount_strategy=None):
self.price = price
self.discount_strategy = discount_strategy
def price_after_discount(self):
if self.discount_strategy:
discount = self.discount_strategy(self.price)
else:
discount = 0
return self.price - discount
practical-python (Object-oriented programming):
class Stock:
def __init__(self, name, shares, price):
self.name = name
self.shares = shares
self.price = price
def cost(self):
return self.shares * self.price
Both repositories offer valuable Python learning resources, but they serve different purposes. practical-python provides a structured course for learning Python fundamentals, while python-patterns focuses on design patterns and their implementation in Python.
An opinionated list of awesome Python frameworks, libraries, software and resources.
Pros of awesome-python
- Comprehensive collection of Python resources, libraries, and tools
- Regularly updated with community contributions
- Covers a wide range of Python-related topics and applications
Cons of awesome-python
- Lacks structured learning path for beginners
- May overwhelm newcomers with the sheer volume of information
- Doesn't provide hands-on coding exercises or projects
Code comparison
Not applicable, as awesome-python is a curated list of resources and doesn't contain code examples. Practical-python, on the other hand, includes practical coding exercises and examples throughout its course material.
Summary
Practical-python is a structured course designed to teach Python programming through hands-on exercises and projects. It offers a clear learning path for beginners and intermediate programmers.
Awesome-python serves as a comprehensive reference for Python resources, libraries, and tools. It's an excellent resource for discovering new Python-related projects and staying up-to-date with the ecosystem, but it doesn't provide a structured learning experience.
Practical-python is better suited for those looking to learn Python systematically, while awesome-python is ideal for developers seeking to explore the vast Python ecosystem and find specific tools or libraries for their projects.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Welcome!
When I first learned Python nearly 27 years ago, I was immediately struck by how I could productively apply it to all sorts of messy work projects. Fast-forward a decade and I found myself teaching others the same fun. The result of that teaching is this course--A no-nonsense treatment of Python that has been actively taught to more than 400 in-person groups since 2007. Traders, systems admins, astronomers, tinkerers, and even a few hundred rocket scientists who used Python to help land a rover on Mars--they've all taken this course. Now, I'm pleased to make it available under a Creative Commons license--completely free of spam, signups, and other nonsense. Enjoy!
--David Beazley (https://dabeaz.com), @dabeaz
(P.S. This course is about Python. If you want a Python course that's about programming, you might consider Advanced Programming with Python)
What is This?
The material you see here is the heart of an instructor-led Python training course used for corporate training and professional development. It was in continual development from 2007 to 2019 and battle tested in real-world classrooms. Usually, it's taught in-person over the span of three or four days--requiring approximately 25-35 hours of intense work. This includes the completion of approximately 130 hands-on coding exercises.
Target Audience
Students of this course are usually professional scientists, engineers, and programmers who already have experience in at least one other programming language. No prior knowledge of Python is required, but knowledge of common programming topics is assumed. Most participants find the course challenging--even if they've already been doing a bit of Python programming.
Course Objectives
The goal of this course is to cover foundational aspects of Python programming with an emphasis on script writing, basic data manipulation, and program organization. By the end of this course, students should be able to start writing useful Python programs on their own or be able to understand and modify Python code written by their coworkers.
Requirements
To complete this course, you need nothing more than a basic installation of Python 3.6 or newer and time to work on it.
What This Course is Not
This is not a course for absolute beginners on how to program a computer. It is assumed that you already have programming experience in some other programming language or Python itself.
This is not a course on web development. That's a different circus. However, if you stick around for this circus, you'll still see some interesting acts--just nothing involving animals.
This is not a course on using tools that happen to be written in Python. It's about learning the core Python language.
This is not a course for software engineers on how to write or maintain a one-million line Python application. I don't write programs like that, nor do most companies who use Python, and neither should you. Delete something already!
Take me to the Course Already!
Ok, ok. Point your browser HERE!
Community Discussion
Want to discuss the course? You can join the conversation on Gitter. I can't promise an individual response, but perhaps others can jump in to help.
Acknowledgements
Llorenç Muntaner was instrumental in converting the course content from Apple Keynote to the online structure that you see here.
Various instructors have presented this course at one time or another over the last 12 years. This includes (in alphabetical order): Ned Batchelder, Juan Pablo Claude, Mark Fenner, Michael Foord, Matt Harrison, Raymond Hettinger, Daniel Klein, Travis Oliphant, James Powell, Michael Selik, Hugo Shi, Ian Stokes-Rees, Yarko Tymciurak, Bryan Van de ven, Peter Wang, and Mark Wiebe.
I'd also like to thank the thousands of students who have taken this course and contributed to its success with their feedback and discussion.
Questions and Answers
Q: Are there course videos I can watch?
No. This course is about you writing Python code, not watching someone else.
Q: How is this course licensed?
Practical Python Programming is licensed under a Creative Commons Attribution ShareAlike 4.0 International License.
Q: May I use this material to teach my own Python course?
Yes, as long as appropriate attribution is given.
Q: May I make derivative works?
Yes, as long as such works carry the same license terms and provide attribution.
Q: Can I translate this to another language?
Yes, that would be awesome. Send me a link when you're done.
Q: Can I live-stream the course or make a video?
Yes, go for it! You'll probably learn a lot of Python doing that.
Q: Why wasn't topic X covered?
There is only so much material that you can cover in 3-4 days. If it wasn't covered, it was probably because it was once covered and it caused everyone's head to explode or there was never enough time to cover it in the first place. Also, this is a course, not a Python reference manual.
Q: Why isn't awesome {command}
in awesome {tool}
covered?
The focus of this course is on learning the core Python language, not learning the names of commands in tools.
Q: Is this course being maintained or updated?
This course represents a "finished product" that was taught and developed for more than decade. I have no plans to significantly revise the material at this time, but will occasionally fix bugs and add clarification.
Q: Do you accept pull requests?
Bug reports are appreciated and may be filed through the issue tracker. Pull requests are not accepted except by invitation. Please file an issue first.
Top Related Projects
Python Data Science Handbook: full text in Jupyter Notebooks
Python best practices guidebook, written for humans.
120+ interactive Python coding interview challenges (algorithms and data structures). Includes Anki flashcards.
All Algorithms implemented in Python
A collection of design patterns/idioms in Python
An opinionated list of awesome Python frameworks, libraries, software and resources.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot