How to learn Python from scratch in 2026: a complete plan from beginner to first project
Python remains the #1 programming entry language — and that hasn't changed in 2024, 2025, or now, 2026. The job market is growing, AI tools speed up learning times, and the syntax is so clean that you'll write your first working program in 15 minutes.
This article is not a "10 chips" or an advertisement for courses. This is a complete practical plan: how long it will take, what to learn in what order, where to take assignments, how to avoid the most common mistakes and when you will be ready for your first real project or job.
How long it actually takes
The honest answer is it depends on your goals and the number of hours in the day.
If your goal is to "understand how the code works, write a helper script":
- 4-6 weeks for 1 hour a day
- 20-30 hours of total net practical time
- This is enough to write useful scripts for work, automate routines, work with APIs
If the goal is a junior developer vacancy:
- 6-9 months for 2-3 hours a day
- 400-600 hours of pure practice
- Plus several real projects in the portfolio
If the goal is data science / ML:
- 9-12 months
- Python is only the foundation, then pandas, numpy, scikit-learn, then ML frameworks
The most common mistake of beginners is overestimating the weekly return (100 hours per week is impossible to maintain) and underestimating the half-year return. Watch less video, write more code. This is truly the best ROI per hour.
What to learn in what order
Don't try to "cover all Python" at once. Here's a proven way that works:
Week 1-2: Basic syntax
- Variables, data types (int, float, str, bool)
- Print, input
- Conditions (if / elif / else)
- Loops (for, while)
- Basic operations with strings and numbers
At this point, the goal is to get used to the syntax. Don't go any further until you can write a program that asks for age and says "you're of age" or "not yet" without a cheat sheet.
Week 3-4: Data structures and functions
- Lists (list), tuples (tuple), dictionaries (dict), sets (set)
- Functions (def, return, arguments, **kwargs)
- Work with strings: split, join, format, f-strings
- Try / except — basic error handling
This is where the real power of Python begins. Most of the real problems are manipulations with lists and dictionaries. Allow an extra week for this if needed.
Week 5-6: OOP and files
- Classes and objects (class, __init__, methods)
- Inheritance and polymorphism (briefly)
- Working with files (open, read, write, with-block)
- JSON, CSV
- Modules and packages, virtual environments (venv)
Don't try to "completely understand OOP" at this stage. It is enough to be able to write a class and explain why it is there. Depth will come with practice.
Week 7-10: Real libraries
Choose a direction and dive in:
- Web: requests (API clients), Flask or FastAPI (own backend), Beautiful Soup (parsing)
- Data: pandas, matplotlib, numpy
- Automation: os, pathlib, subprocess, schedule
- Bots: aiogram (Telegram), python-telegram-bot
Make your first mini-project. Not a photo portfolio site, but something that is useful to YOU.
Free resources that actually work
I will list only what I have seen that works:
- Official Python Documentation (docs.python.org) - sounds boring, but turns out to be fantastic quality stuff once you know the basics.
- Real Python (realpython.com) - Intermediate level articles, very good at explaining "why", not just "how".- Automate the Boring Stuff with Python (automateboringstuff.com) is a free online book. If you want to write useful scripts, and not go to data science, start here.
- CodeMentor AI (learnpython.academy) is our platform. 7 days free, without entering a card. AI mentor in the browser, interactive editor, instant feedback. It was created precisely because we lacked such a product ourselves.
I do NOT recommend free YouTube video courses for systematic self-study. They are good for a specific question ("how does list comprehension work"), but not as a basic trajectory. Without tasks in hand, video is an illusion of progress.
The first project: not a Calculator and not a To-Do app
Classic "first projects" from the courses — calculator, todo application, hello world with a button — don't leave anything in your head, because they are not yours. You do them for the tick.
Instead, do something that you personally need right now:
- A script that checks the weather every morning and sends it to Telegram
- Price parser from your favorite marketplace with discount notification
- File sorter in your Downloads (by type, by date)
- Telegram bot that sends you all your saved posts from various social networks
- If you played Wordle, write a bot that guesses a word in 3 tries
Anything that gives you that "wow, I made it myself, I'm using it" feeling. This is the moment when programming "clicks" in the head.
Top 5 mistakes of beginners
1. "First all the theory, then practice." Never. Do the opposite. Read the minimum, write the code. Faced with a problem - return to the theory. Knowledge obtained for a real task stays in the head 10 times longer.
2. Copying the code without understanding. If you copied from Stack Overflow or from ChatGPT, be sure to rewrite with your hands and explain EVERY term to yourself. Otherwise, it's someone else's code that works, and you're still not a programmer.
3. Avoiding mistakes. Don't panic when the traceback is red. Look at the last sentence - it says WHAT is broken. This is the most important skill: reading traceback. Those who read - grow quickly, those who look for solutions based on the phrase "the program doesn't work" - slow down for months.
4. Waste of time on "tools". VS Code or PyCharm? Black or Pylint? What is the page rate? These are all small choices. Make any and write the code. After 3 months, you will understand what to change, if at all necessary.
5. Loneliness. Find someone to discuss code with. It can be a Discord-server, an AI-mentor, a friend-programmer. Simply telling a stranger why you wrote the way you did is the fastest way to see your gaps.
How to understand that you are ready for interviews
You can without a cheat sheet:
- Write a function that reads a file, counts something and returns the result
- Explain the difference between list and tuple, between == and is
- Find an error in someone else's code from 20-30 lines
- Tell why
if __name__ == "__main__":is needed - Make a request to the API through requests, parse JSON, save to a file
- Create a simple class with 2-3 methods and explain why the class is here
- Write 3-5 lines with try / except that adequately handle the expected errors
If so, try it. Don't wait until you are "sure of everything". Even senior developers are not sure of everything.
And what about AI? Should I learn Python if I have ChatGPT?
Paradox: AI makes Python MORE IMPORTANT, not less needed.
ChatGPT, Claude, Copilot - write code instantly. But:
- They won't launch it for you
- They will not understand why it does not work in your particular environment- They won't see what you're doing with an incorrect data structure
- They will not explain to colleagues why you chose this particular approach
- They will not make the architectural design of your system
Someone who UNDERSTANDS the code that AI writes works 5-10 times faster than someone who writes everything by hand. And the one who DOESN'T understand the AI code writes a bunch of bugs and won't be able to fix the prod at all. AI is a powerful amplifier, but only for those who understand the basics.
So learn Python. right now
What's next?
If you want to try an interactive approach, we have 7-day free access to CodeMentor AI with an AI mentor who answers your questions in the context of the lesson. Without card input. Try →