Python · November 18, 2026 · 6 min read

How long does it take to learn Python from scratch?

By Abdellah El Ghazi, computer science teacher and founder of TeamElGhazi (Maarif, Casablanca)

Short answer: for the basics, allow about 6 weeks of structured learning, enough to go from variables to a first script that automates a real task. To make it a job skill (data analysis or web development), add roughly 4 months of specialisation, so about 5.5 months in total.

How long does it take to learn Python? The basics in 6 weeks with Python Fundamentals (variables, loops, functions, lists and dictionaries, CSV and JSON files, an automation script), live online, 1,000 MAD; a data or web job takes about 4 more months

"How long will it take me to learn Python?" Almost everyone who contacts us asks some version of it: a student who wants one more skill on their CV, an accountant tired of copy-pasting between spreadsheets, a parent wondering whether their teenager is ready. Online, the answers range from "a weekend" to "two years". Both can be true, because they aren't describing the same goal.

Here is a practical answer, based on the actual syllabus and course lengths we teach and on what we see in class.

"Learning Python" means three different things

  • Reading and tweaking a short program: a few weeks is enough to follow what a simple script does and change a value without breaking it.
  • Writing a useful script on your own: that is the goal of Python Fundamentals, 6 weeks, live online, 1,000 MAD. By the end, you automate something from your own day.
  • Turning it into a career: you need a specialty, data or web, which means about 4 more months. At that point Python is one tool among several (libraries, databases, deployment).

So before looking for "the" timeline, ask yourself what you want Python to do for you six months from now.

The first 6 weeks, step by step

This is the order in which topics come up in our Python Fundamentals syllabus:

  1. The basics. Variables, operators, conditions and loops. This is where it clicks that a program is just a list of precise instructions. Most beginners trip over small things here, a missing bracket or a wrong indent. That's normal, and it fades quickly with practice.
  2. Structuring your code. Functions, lists, tuples and dictionaries. You stop writing everything in one block and start organising your data. This is the step that turns someone who copies examples into someone who writes their own programs.
  3. Working with real files. Reading and writing text, CSV and JSON files, and using the standard modules (dates, maths, the operating system). This is where Python starts paying off at work: processing a spreadsheet export, renaming hundreds of files, producing a report.
  4. Writing clean code. Handling errors with exceptions, naming things clearly, documenting. A script that crashes on the first badly filled file is useless in a company.
  5. The project. A complete, documented automation script that runs from the console. It proves you can put everything else together.

A typical final project (an illustrative case, not a real student): a script that reads the morning's orders CSV, totals the amounts per customer and writes a summary. A job that took half an hour by hand now runs with one command.

After the basics: 4 months to a job skill

Diagram of the Python path at TeamElGhazi: day 1 with no code, then Python Fundamentals in 6 weeks (1,000 MAD), then either 4 months of Data Science & AI (3,000 MAD), 4 months of Full Stack Developer (3,000 MAD), or stopping there to automate your own work; about 5.5 months to a data or web profile
  • Data Science & AI (4 months, online, 3,000 MAD): data cleaning with Pandas, visualisation, Scikit-Learn algorithms, neural networks, text processing and RAG systems. For people who want to analyse data or work on AI.
  • Full Stack Developer (4 months, online, 3,000 MAD): React for the interface, REST APIs with Python and Flask, SQL databases, authentication, deployment. For people who want to build web applications.
  • Stopping after the basics is a perfectly good choice too. Many employees don't need a new career, just fewer repetitive tasks in the one they have. If that's you, also look at Automation & No-Code (n8n, Make), which connects your tools without programming.

What really speeds you up or slows you down

  • Consistency beats total hours. Coding a little several times a week works better than one long Sunday session you've forgotten by Thursday.
  • Type the code yourself. Watching videos feels like understanding; you actually learn by writing code and fixing your own mistakes. Our Python comparison exercises are a good example.
  • Have someone to ask. Being stuck for two days on an indentation error is what makes many beginners quit. In a live class, it's sorted in five minutes.
  • Pick a personal project. Automating something that genuinely annoys you gives you a reason to keep going.

Worried you won't keep up? Our article is programming hard for beginners? covers the most common fears. If you'd rather learn remotely in French or Arabic, read learn Python online in French or Arabic.

What about a child or a teenager?

Younger learners usually start with block-based coding before Python, through Scratch for Kids (1 month, online, 1,100 MAD), which teaches loops, conditions and variables without typing errors getting in the way. Our article what age can a child start coding? breaks the steps down by age.

Where to learn Python: Casablanca or remote

Python Fundamentals is taught live online, whether you are in Casablanca, Rabat, Marrakech, elsewhere in Morocco or abroad. The page Python course in Casablanca explains the format, and every course we run is listed on the courses page.

Frequently asked questions

Can I learn Python in a month?

You can get through the syntax in a month, but you will rarely be able to work on your own yet. Our Python Fundamentals course runs for 6 weeks because that is what it takes to go from variables to a working program: functions, lists and dictionaries, CSV and JSON files, error handling, and a final automation script.

How long until I can get a job with Python?

The basics alone won't get you hired. You need a specialty on top: data analysis (Data Science & AI, 4 months, 3,000 MAD) or web development (Full Stack Developer, 4 months, 3,000 MAD). Plan on roughly 5.5 months of training, then personal projects you can show. No course length guarantees a job.

Is Python too hard if I've never coded?

No. It is the language we recommend for a first step: the syntax is short and reads almost like plain English. What makes people struggle is irregular practice, not the language itself.

Is the course in Casablanca or online?

Python Fundamentals is taught live online, so you can join from Casablanca, anywhere in Morocco or abroad, in French or Arabic, for 1,000 MAD. Our center is at 26 rue Nahas Nahoui, Maarif, Casablanca.

More answers on our FAQ.

Not sure where to start? Tell us your goal and we'll point you in the right direction, free of charge.

Contact us