Podcast Title

Author Name

0:00
0:00
Album Art

Learn Python From Scratch in Just 3 Months

By 10xdev team August 09, 2025

If you were to start learning to code today, where would you begin? I started learning Python over 6 years ago while working as a data analyst. It took me at least three years to feel confident in my skills, but today, things are very different. You can reach an intermediate level in Python in just 3 months or less if you learn it the right way. In this article, I'm going to show you exactly how I would Learn Python if I were starting from scratch today.

Is Python Still Worth Learning in the Age of AI?

Before we dive in, let's address the elephant in the room. What's the point of learning to code when AI can write it much faster than we can?

Well, Python is still one of the most in-demand programming languages today. In addition, knowing how to program in Python empowers you to build applications on top of AI models. This means you're not just a consumer of AI; you can build things with it.

Yes, AI can now generate code, making coding more accessible with no-code and low-code tools. But it still has significant limitations that we can't ignore. Hallucination and fabrication may be amusing in conversation, but in coding, they can be fatal. A cybersecurity researcher recently noticed that large language models repeatedly produced a command to install a non-existent Python package. Without sufficient understanding, you might unknowingly allow AI-generated code to install malware in your environment.

That's why you still need to know how to code, even if you use AI to write it. Being proficient in Python will help you verify and correct AI-generated code and leverage AI effectively and safely. Programming is about logical thinking and using that creatively to create a set of instructions. It helps that Python's syntax mostly looks like plain English; even if you don't know how to code, you can often understand what a script is doing.

Choosing Your Development Environment

When I first started, I worried too much about choosing a development environment. While it's important not to get stuck here, choosing the right one can make your life a little bit easier. The ideal environment depends on your goals. Do you want to learn Python to become a developer, or do you want to learn it for data analysis, machine learning, or AI? You can also choose between a local code editor and a hosted service.

At the very beginning, you may not want to bother with installing Python and setting up an environment yourself. You can use an online code editor such as Repl.it, where you can start writing code right away.

For data science and machine learning specifically, a common tool is the Jupyter Notebook, which allows you to run blocks of code individually and inspect the results. An online version of this is Google Colab, a hosted Jupyter Notebook service that requires no setup and provides free access to computing resources. This is a great option for small projects and real-time collaboration.

However, in the long run, it's best to install Python on your computer so you can use it locally. You can then use Python directly in your terminal. For example, you can use it as a quick calculator or to print a fun message:

# Use Python as a calculator
>>> 5 * 10
50

# Print a message
>>> print("Hello from the terminal!")
Hello from the terminal!

The next step is to install an Integrated Development Environment (IDE) like Visual Studio Code or PyCharm. These are software applications that help you develop general applications and make it easy to edit code, with all the functionalities you might need built-in. I used to use Jupyter Notebook a lot for my data science projects, but nowadays I find it easier to use it inside Visual Studio Code, as I can easily integrate tools like GitHub Copilot, which we'll talk about later in this article.

A Roadmap for Learning Python

Once you decide which tool to use, you can immediately start learning the basics like variables, data types, and functions. You'll want to understand control flow, such as conditional statements and loops. Don't get carried away; a lot of times, we get stuck in the details of small topics and lose motivation. We want to avoid that.

To help you visualize what you may want to learn at each stage, I've created a conceptual mind map for learning Python.

Level 1: The Basics

As you can imagine, the basic topics include setting up your IDE, installing and managing packages, and understanding the working directory. You'll also cover the fundamentals of any programming language:

  • Data Types: (e.g., strings, integers, floats, booleans)
  • Variables: Storing information.
  • Functions: Creating reusable blocks of code.
  • Operators: (e.g., +, -, *, /, ==, >)
  • Conditional Statements: (if, elif, else)
  • Loop Statements: (for, while)

It's fine not to completely understand everything at this stage. You'll have the chance to practice and solidify your knowledge in the next levels.

Level 2: Intermediate Concepts

Moving on to the intermediate topics is where you can start doing really useful things. On this level, you should learn more advanced concepts like:

  • Working with different types of files (e.g., CSV, JSON, TXT).
  • Version Control with Git.
  • Python for Data Science (data analysis and machine learning).
  • Object-Oriented Programming (OOP).
  • Decorators.
  • Debugging and Error Handling.

At this stage, you also want to pay attention to good coding practices, meaning writing clean, readable, and efficient code. There's a distinction between writing code for a personal toy project and building something for the real world.

Key Coding Practices: * Follow the PEP 8 style guide for Python code and be consistent. * Use meaningful variable names. Naming things is one of the hardest parts of programming! * Avoid hard-coding numbers in your code. No one will understand what these "magic numbers" represent. * Use list comprehensions and generators when necessary instead of verbose for loops. * Add robust error handling to your code. * Provide commenting and documentation. * Use virtual environments to encapsulate packages for separate projects. * Create unit tests for your functions.

There can be a lot to learn, so I'd recommend you start thinking about what you want to focus on. For example, if you're learning Python for data science, machine learning, and AI, you'll need to master the basics plus essential packages for working with data, such as NumPy, Pandas, Matplotlib, Seaborn, and Scikit-learn. If you want to become a data engineer or software engineer, then Object-Oriented Programming, decorators, and writing efficient, clean code are even more important.

Level 3: Advanced Applications

Once you've moved on to the more advanced topics, you can start building more complex applications. You can learn how to use an API, develop a web application with a user interface, or build a complex game. This is also where you start moving from building prototypes in Jupyter Notebooks to building user-friendly applications. There are numerous popular frameworks that make it easier to develop web apps, such as Django and Flask. You'll also learn how to deploy your application on a cloud hosting platform.

The Best Way to Learn: Learn, Do, Teach

This overview is just guidance. The best way to actually learn something is through doing, and the best way to own your knowledge is through teaching.

Most of us learn like this: you learn something, move on to the next thing, and then the next. By the time you move on to the fourth or fifth topic, you've already forgotten the previous ones. This isn't because you're not smart; it's because if you learn something without immediately applying it, your brain gets a signal that the information isn't important.

A better way to learn Python is to immediately put what you've learned into practice. Create something useful with it. This "something" doesn't need to be world-changing. For example, if you just learned about Python functions, you can create a function to calculate your BMI. If you need ideas, you can simply go to ChatGPT and ask it to create a quiz or practice problem for you.

At this point, you might think you can move on, or you can decide to go to the next level: teach others what you've learned. I love writing blog posts and tutorials to explain concepts I've just learned. By teaching, you learn more deeply and reveal gaps in your knowledge that you would otherwise never know. It's said that no one learns as much about a subject as one who is forced to teach it.

For me, the best formula to learn coding is: Learn, Do, Teach. Repeat.

Navigating the "Valley of Despair"

This is easier said than done. Almost all of us experience a dip in confidence and motivation while picking up a new skill, and coding is no exception. You get started feeling very excited, learning how to print "Hello, World!" and making your first for loop. You feel like you're crushing it.

But this is just an illusion. It's related to the Dunning-Kruger effect in psychology, which suggests that people with low ability at a task overestimate their ability. After a week or two, you start feeling overwhelmed and realize how little you actually know. You wanted to learn Python for machine learning, but you just realized you also need to learn math, statistics, and some computer science concepts.

This is completely normal. Unfortunately, many people give up at this stage. If you can't push past this, you'll forever be a beginner. In today's world, being a beginner means you're less competent than an AI. All you need to do is trust the process.

Learn with Purpose: The Power of Personal Projects

For me, the best way to get out of the "valley of despair" is to learn with a purpose. Find a problem you want to solve and create a personal project that solves it. This will help shift your focus from "I'm incompetent" to "I'm learning what it takes to solve a real-life problem."

Your project doesn't need to be complicated. It doesn't need to change the world. It just needs to be a little bit useful. One of my first projects was to take all the books from The Witcher book series to create a network graph of the characters in the story. It wasn't world-changing, but it was fun, doable, and threw a lot of new ideas and concepts at me. That's the point. When you get absorbed in your project, you're just too excited to stop.

You'll also come across many similar projects from other people. You can then reverse-engineer what they have done to tackle the same challenges, which will help you build your own problem-solving skills.

In the age of AI, you no longer have to do projects all by yourself. Nowadays, I often use GitHub Copilot to help me write code faster and with fewer errors. In data science, this really helps you focus more on the idea and the creative process rather than getting bogged down with fixing data types or adjusting chart axes. Believe me, that can consume a lot of time.

Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Recommended For You

Up Next