- Saved searches
- Use saved searches to filter your results more quickly
- License
- PacktPublishing/Learn-Python-Programming-Third-Edition
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- Saved searches
- Use saved searches to filter your results more quickly
- License
- PacktPublishing/Expert-Python-Programming-Third-Edition
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Learn Python Programming — Third Edition
- Book description
- Key Features
- Book Description
- What you will learn
- Who this book is for
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Learn Python Programming 3E. Published by Packt
License
PacktPublishing/Learn-Python-Programming-Third-Edition
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Learn Python Programming 3rd Edition
Welcome to Learn Python Programming, 3rd Edition.
Here you can find the complete source code for this book. Every line of code you will find in the book is in this repository, plus all the code that we couldn’t fit in the book.
We suggest you create a dedicated virtual environment for each chapter you wish to work on. Chapters that require third-party libraries will have a folder inside, called requirements .
First you will need to create a virtual environment. If you don’t know what a virtual environment is, please read Chapter 1.
Let’s now pretend you want to work on Chapter 12. First, change into the folder for Chapter 12 (it’s called ch12 ):
Then, create a virtual environment. In this example the virtual environment will live inside the chapter’s folder, but you can choose any other folder that might suit you better.
We have given the virtual environment folder the name .venv . Feel free to choose any other name that you might want.
Note: the above procedure might fail in some of the chapter folders, due to the presence of files that aren’t meant to be run. If that is the case, you should choose another folder where to place your virtual environment. You can create one within the chapter folder itself, or place the virtual environment outside of the chapter folder altogether.
Next step is to activate the virtual environment:
If you’re on Windows, to activate your environment, you will need to run:
Next, if the requirements folder is present, change into it, and run the following command for each of the .txt files you will find in it. Normally there is only a requirements.txt file.
$ cd requirements $ pip install -U -r requirements.txt $ cd .. # this brings you back to the root of the chapter
Once you have installed all requirements, you are ready to run the chapter’s code. If a chapter needs extra work to be set up, you will find all the instructions you need in the chapter’s text.
Note: Always remember to activate the virtual environment before you install third-party libraries.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
About
Learn Python Programming 3E. Published by Packt
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Expert Python Programming, Third Edition, published by Packt
License
PacktPublishing/Expert-Python-Programming-Third-Edition
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Expert Python Programming — Third Edition
This is the code repository for Expert Python Programming — Third Edition, published by Packt.
Become a master in Python by learning coding best practices and advanced programming concepts in Python 3.7
Python is a dynamic programming language that’s used in a wide range of domains thanks to its simple yet powerful nature. Although writing Python code is easy, making it readable, reusable, and easy to maintain is challenging. Complete with best practices, useful tools, and standards implemented by professional Python developers, the third edition of Expert Python Programming will help you overcome this challenge.
This book covers the following exciting features:
- Explore modern ways of setting up repeatable and consistent development environments
- Package Python code effectively for community and production use
- Learn modern syntax elements of Python programming such as f-strings, enums, and lambda functions
- Demystify metaprogramming in Python with metaclasses
- Write concurrent code in Python
- Extend Python with code written in different languages
- Integrate Python with code written in different languages
If you feel this book is for you, get your copy today!
Instructions and Navigations
All of the code is organized into folders. For example, Chapter02.
The code will look like the following:
print("hello world") print "goodbye python2"
Following is what you need for this book: This book will appeal to you if you’re a programmer looking to take your Python knowledge to the next level by writing efficient code and learning the latest features of version 3.7 and above.
The required softwares are specified chapter wise in the book.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
with nogil: result = fibonacci_cc(n) return fibonacci_cc(n)
Michal Jaworski has 10 years’ of professional experience in Python. He has been in various roles at different companies, from an ordinary full-stack developer, through software architect, to VP of engineering in a fast-paced start-up company. He is currently a senior backend engineer at Showpad. He is highly experienced in designing high-performance distributed services. He is also an active contributor to many open source Python projects.
Tarek Ziade is a Python developer located in the countryside near Dijon, France. He works at Mozilla in the services team. He founded a French Python user group called Afpy, and has written several books about Python in French and English. When he is not hacking on his computer or hanging out with his family, he’s spending time between his two passions, running and playing the trumpet.
Other books by the authors
Click here if you have any feedback or suggestions.
Learn Python Programming — Third Edition
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
Get up and running with Python 3.9 through concise tutorials and practical projects in this fully updated third edition
Key Features
- Extensively revised with richer examples, Python 3.9 syntax, and new chapters on APIs and packaging and distributing Python code
- Discover how to think like a Python programmer
- Learn the fundamentals of Python through real-world projects in API development, GUI programming, and data science
Book Description
Learn Python Programming, Third Edition is both a theoretical and practical introduction to Python, an extremely flexible and powerful programming language that can be applied to many disciplines. This book will make learning Python easy and give you a thorough understanding of the language. You’ll learn how to write programs, build modern APIs, and work with data by using renowned Python data science libraries.
This revised edition covers the latest updates on API management, packaging applications, and testing. There is also broader coverage of context managers and an updated data science chapter.
The book empowers you to take ownership of writing your software and become independent in fetching the resources you need. You will have a clear idea of where to go and how to build on what you have learned from the book.
Through examples, the book explores a wide range of applications and concludes by building real-world Python projects based on the concepts you have learned.
What you will learn
- Get Python up and running on Windows, Mac, and Linux
- Write elegant, reusable, and efficient code in any situation
- Avoid common pitfalls like duplication, complicated design, and over-engineering
- Understand when to use the functional or object-oriented approach to programming
- Build a simple API with FastAPI and program GUI applications with Tkinter
- Get an initial overview of more complex topics such as data persistence and cryptography
- Fetch, clean, and manipulate data, making efficient use of Python’s built-in data structures
Who this book is for
This book is for everyone who wants to learn Python from scratch, as well as experienced programmers looking for a reference book. Prior knowledge of basic programming concepts will help you follow along, but it’s not a prerequisite.