- Assignment 1: Start With the Basics
- Assignment 2: E-Books!
- Assignment 3: Get Familiar With Stack Overflow
- Assignment 4: Use Coding Challenge Websites
- Assignment 5: Build a Game
- Assignment 6: Get to Know Some Common Libraries and Tools
- Assignment 7: Learn a Framework
Wondering how to learn Python on your own? There are plenty of Python tutorials and resources on Envato Tuts+! It's definitely one of the best websites to learn Python.
What Is Python?
Python is more popular than ever, and it's being used everywhere from back-end web servers to front-end game development and everything in between. Python is a true general-purpose language and is quickly becoming a must-have tool in the arsenal of any self-respecting programmer.
Python is easy to learn, reads like pseudo-code, and is wickedly agile.
Learn Python the easy way with these tutorials. Jump to content in this section
Learning any new language can be a daunting task, and finding the right places and people to learn from is half the battle. That's where this guide can help. This is your blueprint for making Python easy, fun, and rewarding to learn.
In this article, we cover websites, books, coding challenge platforms, tools, and other resources that will help you go from a beginner to an expert when it comes to programming with Python.
In this course, instructor Derek Jenson will help you to learn to start coding with the Python language. You'll start with the very basics to lay a solid foundation for future learning.
Assignment 1: Start With the Basics
Python is widely regarded to be the most beginner-friendly programming language due to its simple syntax, which is in many ways similar to the English language. Thanks to Python's simple and concise syntax, developers can use it to write simple and complex programs with fewer lines of code.
New programmers seeking to learn Python are required to start from the basics. This includes learning about the basic syntax, control flow and loops, simple data structures, basic string formatting, and many other basic language features.
Beyond that, you also have mid-level topics like making complex loops, using dictionaries, lists, and other complex structures, doing list slicing, errors, and exception handling.
The Python language also has thousands of third-party libraries which you can use to achieve specific tasks in your program more quickly.
Python 2 or Python 3?
At the time of writing this, there are two main versions of Python in circulation: Python 2.x and Python 3.x. We recommend starting with Python 3 for its simpler syntax and compatibility with third-party modules. Many recent libraries may require a Python 3.x version to properly work. It also doesn't help that Python 3 is not backwardly compatible with Python 2. To ensure that you're on the safe side, we recommend using Python 3.7 or a later version. It might also be worth knowing that versions 2.x are no longer being maintained.
Ultimately the choice is yours, but if your code acts differently to any given tutorial, you might need to use the Python version used in the tutorial.
Great Tutorials to Learn the Basics of Python
There is no shortage of websites for learning the basics of Python. In fact, here at Envato Tuts+, we have some great Python tutorials as well as some Python courses to help you learn different Python topics, tools, and libraries. However, if you're looking for something more beginner-level, like a series of tutorials to introduce you to the basics of Python, then here are some great sources for you to check out!
1. The Official Python Tutorial
You won't find a better, more up-to-date source of information than the official python.org documentation. However, if you want to jump right in, as I'm sure many of you will, this might not be the best place to start.
The content tends to be more technical than wikibooks, which will be helpful later on as you progress through the language. But, for a beginner, it may just get in the way of what really is a very simple and beautiful language.
Video-based tutorials are known to create a more active learning experience. If you prefer videos to written articles, then check out the following tutorials.
2. Python From Scratch Series
A little closer to home is Giles Lavelle's intro to Python. Lavelle assumes zero prior programming experience. The series takes you through the most important parts of Python 2 and helps you master the basics of Python. Each post in the series contains a screencast version.
If you want to see some real-world applications of your applications, or would like to aim towards web development with Python, this series might be the one for you.
- Python from Scratch: Getting StartedGiles Lavelle05 May 2011
- Python from Scratch: Variables, Data Types and Control StructureGiles Lavelle16 Jun 2011
- Python from Scratch - Functions and ModulesGiles Lavelle22 Jul 2011
- Python from Scratch: Object Oriented ProgrammingGiles Lavelle24 Aug 2011
- Python From Scratch: Create a Dynamic WebsiteGiles Lavelle19 Feb 2022
3. Working With Databases in Python
4. Mathematical Modules in Python
5. Working With Documents in Python
- How to Create and Edit PDF Documents in PythonNitish Kumar30 Nov 2022
- How to Work With PDF Documents Using PythonAbder-Rahman Ali28 Nov 2022
- How to Use Python to Find the Zipf Distribution of a Text FileAbder-Rahman Ali23 Aug 2022
- How to Read Extremely Large Text Files Using PythonAbder-Rahman Ali22 Aug 2022
- How to Read and Write CSV Files in PythonEsther Vaati27 Sep 2022
- How to Work With Excel Documents Using PythonAbder-Rahman Ali05 Jun 2022
6. Other Python Tasks
Assignment 2: E-Books!
It's hard to beat a good book when you're trying to learn something new, and with the great community that has developed around the Python language, there is a plethora of free, high-quality e-books to choose from.
Below is a quick list of some of the best. You can download a free e-book version for each of them, or you can choose to buy the physical book (or donate) if you want to support the author, which I'm sure they would greatly appreciate.
1. Learn Python The Hard Way
Despite the name, Learn Python The Hard Way makes learning Python incredibly easy—the way it's meant to be! In this book, Zed A. Shaw works from the ground up, giving you a detailed and comprehensive guide to Python without getting in the way of the actual coding. Shaw is informal but thorough, making the book an easy but rewarding read.
2. Think Python 2nd Edition by Allen B Downey
This is the second edition of Think Python: How to think like a computer scientist, which uses Python version 3. As the subtitle might suggest, Think Python strays a little more towards the theoretical side of things.
This may prove a little frustrating for a total beginner, but the book is well worth the read in regard to algorithm theory and high-level concepts.
If you are using Python 2, you might want to grab the first edition.
3. The Django Book
If you want to learn Python for web development, then you're probably going to be using the Django framework. This book assumes fluency in Python, but it teaches Django as if you are a beginner to the framework. The Django Book is as good as they come and will be invaluable for any budding web developer.
You can download the Django book for free.
If you want a book on a specific topic, or a book written in a language other than English, then you should check out PythonBooks. The folks over at python.org have compiled an extensive list of books, sorted by difficulty, topic, and language.
Assignment 3: Get Familiar With Stack Overflow
Thousands of developers have experienced every problem that you are bound to face. Stack Overflow is a great resource where developers find solutions to their problems. When you happen upon an error that you're not sure how to fix, search Stack Overflow. You will more than likely find a solution and how other people solved their problem.
But Stack Overflow isn't just full of 'newbie' errors and problems; some really clever and helpful people use the site—learn from them!
Take a look at the Hidden features of Python thread, for example.
Many of the tips and tricks you see here may not be covered in many formal tutorials, but they will be extremely helpful for intermediate to advanced Python users.
Assignment 4: Use Coding Challenge Websites
Another very good way to improve your coding skills is by solving coding challenges. Solving different types of programming challenges and puzzles in a particular language will help you understand the nuances of the language, learn new ways of achieving the same task, prepare for job interviews, and more.
1. Project Euler
Project Euler (pronounced ‘Oil-er', to save you some embarrassment later on) is one of my favorite websites. After making an account, you can work through the ~400 problems on the website. Each problem is about 50% mathematics and 50% programming and, in my opinion, the most rewarding way to learn more about either subject.
The problems start off easy to test your knowledge of the language, but grow in difficulty to challenge even the most seasoned programmers. Eventually, the difficulty of the problems will force you to find the most efficient algorithm—that is if you don't want to wait hours to compute the answer.
Nothing will turn you into a programming wizard more quickly than pushing yourself for the fastest and most efficient solutions to the Project Euler problems.
When you crack a new problem, you gain access to that problem's forum thread, where many people discuss their solutions and ideas with one another. Many of the solutions in later pages of the thread will be in Python. This is really the key to growing your programming prowess. If there is someone with a solution that is faster than yours, take the time to analyze it to see where you could improve your own solution. Over time, you will pick up all the tricks of the trade and grow your Python knowledge in a meaningful and rewarding way.
Codewars is one of the most popular platforms for practicing your programming skills. The platform is suited for beginners, intermediate-level, and advanced programmers. Once you have signed up for a Codewars account, you can begin solving coding problems from over 50 programming languages, Python included.
In Codewars, there are different difficulty levels (kata) for questions. This ranges from 8kyu (easiest level) to 1kyu (most difficult level).
If you don't know the answer to a problem, then there's no shame in viewing the solution. Some questions may provide the option to view the answer (unlock solutions button). Another way to see the result is with a simple Google search—just type the question followed by "codewars solution". Seeing how other people solved a problem may help you learn different coding techniques.
Assignment 5: Build a Game
Few things are more satisfying than building your own game. It can be a steep learning curve, but well worth it and very rewarding. PyGame is the best-known game library for Python, and you will be able to find many free tutorials on it.
Check out our Building Games With PyGame series to learn how to build games using the PyGame library.
- Building Games With Python 3 and Pygame: Part 1Gigi Sayfan15 Jan 2018
- Building Games With Python 3 and Pygame: Part 2Gigi Sayfan16 Jan 2018
- Building Games With Python 3 and Pygame: Part 3Gigi Sayfan17 Jan 2018
- Building Games With Python 3 and Pygame: Part 4Gigi Sayfan18 Jan 2018
- Building Games With Python 3 and Pygame: Part 5Gigi Sayfan19 Jan 2018
Assignment 6: Get to Know Some Common Libraries and Tools
Python is a general-purpose language that can do almost anything, so of course there is a seemingly endless supply of libraries and tools out there. Here are some of the most popular.
NumPy + SciPy
These two usually go hand in hand (SciPy is dependent on NumPy). If you are doing some serious number-crunching for mathematical or scientific research, then these two libraries will be your best friends.
To learn more about NumPy, read our introductory article on NumPy which demonstrates how to use the library to perform numerical computing and solve scientific and mathematical problems in Python.
Beautiful Soup really is beautiful. If you need to scrape an HTML page for some information, you will know all too well the frustration and hair loss that it can bring. Beautiful Soup will do all this for you and add years to your life. Highly recommended and fun to play around with.
Feel free to check out our Scraping Websites With Beautiful Soup series, which demonstrates how to scrape webpages for titles, headlines, and links using the Beautiful Soup library. We also have a free course on the topic if you're interested!
Python Image Library (Pillow)
The Python Image Library (PIL) is an extensive library that is great for anything to do with images. If you need to manipulate an image, chances are PIL can do it for you. We also have an article to help you learn how to process images in Python using scikit-image.
Assignment 7: Learn a Framework
As mentioned previously in the article, the Django framework is what you will probably use if your aim is web development. It is the most common web framework for Python and also has the most learning resources available.
Flask is another great framework and is even easier to get started with as a beginner.
Free Online Django Course
In this free course, Derek Jensen gets you started with Django. Over the course of 19 lessons, you'll learn about the basics of Django applications and how to use a database with Django. In addition, you'll get your hands wet by building a real Django application from scratch.
In this course, you'll learn all the basics of creating a web app with Django: how to create a new app from scratch and how to code Django views, models, URL paths, migrations, templates, and more. Along the way, you'll build a complete web app.
Hands-on Tutorials for Django
- How to Cache Using Redis in Django ApplicationsEsther Vaati16 Dec 2022
- JWT Authentication in DjangoEsther Vaati15 Dec 2022
- Python From Scratch: Create a Dynamic WebsiteGiles Lavelle19 Feb 2022
Django is the first framework that comes to mind for Python, but Flask is another very popular framework. And in fact, for beginners, it's easier to get started with.
- Creating a Web App From Scratch Using Python Flask and MySQLJay26 Feb 2022
- Creating a Web App From Scratch Using Python Flask and MySQL: Part 2Jay11 Apr 2022
- Flask Authentication With LDAPShalabh Aggarwal18 Nov 2022
- Building RESTful APIs With Flask: The DIY ApproachShalabh Aggarwal07 Mar 2022
Choose any of these tutorials and resources to learn Python the easy way! I hope I have been able to provide a solid base of Python knowledge for you. Follow all the links in this article to learn more about this powerful programming language.
This post has been updated with contributions from Kingsley Ubah. Kingsley is passionate about creating content that educates and inspires readers. Hobbies include reading, football and cycling.