How to start learning python

How to start learning python

By Maximus Meadowcroft | December 02, 2024


Introduction

If you want to learn how to program, python is a great first choice. In this blog I have a detailed roadmap on how you can get started as a beginner and get to the point where you can program out pretty advanced programs.

Below I have all 6 steps you need to get started. This blog outlines what to learn.

If you want to go through a course, I have on for free on my YouTube or you can also go through it within the developer community that I run. You can get access to other people in your same position and additional resources to help you get started. If you are interested you can book a meeting here:

https://scheduler.zoom.us/max-meadowcroft/python-dev-com-intro

Step 1: Get Started with Python

This is the first step you need in order to learn how to program. What you should do at this stage is understand what python is, how you can use it, why you want to use it.

After that you will need to set up a programming environment. I would recommend using Visual Studio Code for your first IDE. I will be writing a blog and creating resources at some point to go more in depth about this, but for now you can go to:

https://www.python.org/downloads/

When you are here download Python then go through the installation process. Make sure that you click "Add to Path" when you are able to.

After this you need an IDE. This is a Integrated Development Environment. It is basically where you will write your code, edit your code, and run your code.

I would recommend using Visual Studio Code for beginners. To download it go to this link and press download.

https://code.visualstudio.com/

Then go through the installer and open it.

Once you are in the installer you should see an onboarding. Go through it, it will teach you some of the basics of the program. At the end you should go to the extensions on the left side of the screen and add the Python one.

After this you can make a new file and type:

print("Hello World")

Then press the run button on the top right and you should an output. Congratulations at this point you have written your first piece of code.

Step 2: Basic Statements and Operations

Now that you can actually write and run code you should start learning some of the basic building blocks of Python.

I would recommend learning things in this order:

  • Variables - What they are and how they work
  • Different data types - The difference between strings, integers, and floating point numbers
  • Strings - spend some time learning the basics about strings including f-strings and how to combine numbers with strings etc
  • Printing - learn about the print statement and how to output things from your code
  • Input - Learn how to get user input with the input() call
  • Arithmetic - Learn how to add, multiply, subtract, divide, and learn about modulus
  • Comments - Learn what comments are and how to user them

At this point you should be able to do some simple project. In my course I have people do a Tax calculator, but you can get creative in order to test yourself and apply your knowledge.

Step 3: Working with Data Structures

At this point you can start getting into some more advanced data types:

  • Lists - Learn a lot about these since you use them a lot
  • Tuples - Just learn basics about these
  • Dictionaries - Learn a lot about these

These are all data types that allow you to store multiple pieces of data together.

At this point you should be able to do even more and complete some more advanced projects.

Step 4: Control Flow and Looping

This part is where you really can get powerful in the programs that you make. You are going to learn about conditionals and looping.

This allows you to change what your program does based on certain parameters and also execute the same part of code over and over again. This is extremely valuable in your code.

I would recommend learning about these in this order:

  • Boolean values - Learn what these are
  • If, elif, and else - Learn about these
  • for loops - Learn about how to loop through a section of code. Also learn how to iterate through a list, tuple, or dictionary
  • while loops - Learn how to make a while loop. It's like combining an if statement with a for loop

At this point you can write most programs. You should keep doing projects as you think of them to test and refine your skills.

Step 5: Functions and Classes

This is the last real step of this. You should learn about Functions and Classes (at least the basics of them) and how to make them and when to use them.

These will allow you to make parts of your code reusable throughout and really give you power and reusability with what you make.

After you learn about Functions and Classes you know all of the basics of Python and can write most general projects.

Try to test out your abilities by making some things that are actually useful in your life.

Step 6: Advanced Concepts

At this point you should start learning about the different libraries within python, how to install other libraries, APIs, and whatever nice you want to go into (machine learning, web scraping, automation, web apps, data science, etc).