To learn Python from scratch, install it, write small programs every day and learn the core ideas in order: variables, data types, decisions, loops, functions and lists. Build small projects early, because writing code teaches far more than watching or reading about it. About 30 to 60 minutes of regular practice a day is a good start.


Step 1: Set up Python

Download Python from the official python.org website, or use an online editor if you cannot install software. A simple editor such as IDLE (which comes with Python) or Visual Studio Code is enough. Check that you can run a one-line program: print('Hello, world'). Seeing it run is the first win.


Step 2: Learn the building blocks, in order

  1. Variables and data types: numbers, text (strings) and True or False values.
  2. Input and output: asking a user for a name and printing a reply.
  3. Decisions: if, elif and else, to choose between actions.
  4. Loops: for and while, to repeat tasks.
  5. Lists and dictionaries: to store collections of items.
  6. Functions: to package up code you want to reuse.
  7. Reading and writing files, and handling errors.

Learn one idea at a time, and write a small program that uses it before moving on.


Step 3: Build tiny projects

Choose projects that are slightly beyond what you know, and look up what you need as you go.


Step 4: Read errors calmly

Error messages are not failures. Read the last line first, as it names the type of error, then find the line number it points to. Typos, missing colons and wrong indentation are the most common causes for beginners. Copy the error into a search engine if you are stuck.


Step 5: Practise little and often

Daily short sessions beat occasional long ones. Type the code yourself instead of pasting it, and then change it to see what happens. Keep a notes file of what you learn, in your own words.


Step 6: Choose a direction

Once you are comfortable with the basics, pick an area that interests you. Python is used for automation, data analysis, web apps, games and more. A goal, such as tidying up spreadsheets at work, keeps you motivated.


Common beginner traps

Use trusted, up-to-date resources, and be careful about running code you do not understand from unknown sources.


Common questions


How long does it take to learn Python?

You can write useful small programs within weeks of regular practice. Becoming confident enough to build larger projects often takes several months.


Do I need to be good at maths?

Not for most beginner work. Logical thinking matters more, and any maths needed tends to be basic.


Is Python a good first language?

Yes. Its readable syntax and wide range of uses make it a popular first choice.


Learn the full skill: Python for Beginners: Write Real Programs from Scratch

More plain-English answers: see all quick answers.

Learn something new every week

One short, practical tip each Thursday, plus news when new courses open. Free, and you can unsubscribe in one click.

We'll never share your email. See our privacy policy.