O
Octo
O
Octo
CoursesPricingDashboardPrivacyTerms

© 2026 Octo

Python Fundamentals
1Why Python2Variables & Data Types3Control Flow4Functions5Data Structures6Working with Files & Data7Libraries & Packages8Your First Python Project
Module 1

Why Python

Python runs Instagram, Netflix, and NASA — here's why it became the world's most popular language and how to get started in under 20 minutes.

October 2010 — two engineers, 13 photos, and a language nobody expected

When Kevin Systrom and Mike Krieger launched Instagram, they had no engineering army. No billion-dollar budget. Just two people, a tight deadline, and a choice to make: what programming language should power the app that would eventually serve over two billion users?

They chose Python.

Not because it was the fastest language. Not because it was the trendiest. Because two engineers could build a working product in weeks instead of months. Instagram's entire backend — user accounts, photo uploads, feeds, search — ran on Python and a framework called Django. When Facebook acquired Instagram for $1 billion in 2012, the team was still only 13 people. The codebase was still Python.

That is the superpower of Python: it lets you build real things, fast, even if you are just getting started.

2B+Instagram monthly active users

13 peopleInstagram team at $1B acquisition

1stmost popular programming language (TIOBE 2025)

What exactly is Python?

Think of a programming language like a human language — it is a way to give instructions that a computer can understand. English lets you communicate with people. Python lets you communicate with machines.

But unlike most programming languages, Python was designed from day one to be readable. Its creator, Guido van Rossum, named it after Monty Python's Flying Circus (yes, the comedy show) and wanted programming to feel less like deciphering hieroglyphics and more like reading plain English.

Compare a simple task — printing "Hello, World!" — in three languages:

// Java
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
// C
#include <stdio.h>
int main() {
    printf("Hello, World!\n");
    return 0;
}
# Python
print("Hello, World!")

One line. No boilerplate. No semicolons. No curly braces. That is Python.

✗ Without AI

  • ✗Verbose syntax with brackets and semicolons
  • ✗Steep learning curve for beginners
  • ✗Compiled before running
  • ✗Months to build a prototype

✓ With AI

  • ✓Clean, readable syntax like English
  • ✓Beginner-friendly from day one
  • ✓Runs immediately (interpreted)
  • ✓Days to build a prototype

Who uses Python — and for what?

Python is not a niche tool. It is the Swiss Army knife of programming. Here are some of the things people build with it every day:

Use caseWho uses itWhat they build
Web developmentInstagram, Pinterest, SpotifyFull web applications using Django and Flask
Data analysisEvery Fortune 500 companyReports, dashboards, data pipelines with pandas
Machine learning / AIGoogle, OpenAI, TeslaChatGPT, self-driving car systems, recommendation engines
AutomationIT teams everywhereScripts that rename 10,000 files in seconds
ScienceNASA, CERN, universitiesSimulations, image processing, research analysis
FinanceGoldman Sachs, JP MorganTrading algorithms, risk models, portfolio analysis

Language Popularity (TIOBE Index 2025, approximate %)

🔑Python is the #1 first language taught at universities
8 of the top 10 US computer science programs (MIT, Stanford, Carnegie Mellon, Berkeley, and others) teach Python as the introductory programming language. If it is good enough for MIT freshmen, it is good enough for anyone starting out. You are learning the right language.

There Are No Dumb Questions

"Is Python too slow for real applications?"

Python is slower than C or Java at raw computation, yes. But for 95% of tasks, it is fast enough — and the time you save writing and debugging code more than makes up for it. Instagram serves billions of requests per day in Python. When speed is critical, Python calls fast C libraries under the hood (this is how numpy and pandas work). You get Python's simplicity with C's speed where it matters.

"Do I need to be good at math to learn Python?"

No. Programming is about logic, not calculus. If you can follow a recipe (first do this, then do that, if this happens do something else), you can program. Math helps in specific domains like data science, but basic Python requires zero math beyond arithmetic.

Setting up your environment

Time to stop reading and start doing. You need three things: Python itself, a code editor, and a terminal.

Step 1: Install Python — Go to python.org/downloads and download Python 3.12 or later. On the installer, CHECK the box that says "Add Python to PATH" — this is the most common beginner mistake to skip.

Step 2: Install VS Code — Download Visual Studio Code from code.visualstudio.com. It is free, lightweight, and the most popular code editor in the world. Once installed, open it and install the "Python" extension by Microsoft.

Step 3: Verify the install — Open your terminal (Terminal on Mac, Command Prompt on Windows) and type python --version. You should see something like Python 3.12.x. If you see an error, Python was not added to PATH — reinstall and check the box.

Step 4: Write your first program — In VS Code, create a new file called hello.py. Type print("Hello, World!") and press the play button (or run python hello.py in the terminal). You just wrote your first Python program.

⚠️The PATH checkbox matters
When installing Python on Windows, the installer shows a checkbox at the bottom: "Add Python to PATH." If you skip this, your terminal will not recognize the `python` command. If you already installed without it, uninstall Python and reinstall with the checkbox ticked. This single checkbox causes more beginner headaches than any other step.

⚡

Your First Line of Code

25 XP
Open your terminal or VS Code and type the following: ```python print("Hello, World!") ``` Now modify it to print your own name: ```python print("Hello, my name is ___!") ``` Replace the blank with your actual name and run it. What appears on screen? _Hint: The `print()` function displays whatever you put inside the parentheses and quotes. The quotes tell Python "this is text, not a command."_

The Python philosophy — why it feels different

Python has an actual design philosophy. Type import this into a Python terminal and you get "The Zen of Python" — 19 guiding principles. The ones that matter most for you right now:

  • Beautiful is better than ugly — write clean, readable code
  • Simple is better than complex — do not overcomplicate things
  • Readability counts — code is read far more often than it is written
  • There should be one obvious way to do it — Python avoids giving you five confusing ways to do the same thing

This is why Python code looks clean. Other languages let you write cryptic one-liners that nobody can read. Python's culture actively discourages that.

There Are No Dumb Questions

"What is the difference between Python 2 and Python 3?"

Python 2 reached end-of-life on January 1, 2020. It is dead. Do not learn it, do not use it, do not install it. Every modern tutorial, library, and job uses Python 3. If you see a tutorial using print "hello" (without parentheses), it is Python 2 — close that tab and find a newer resource.

"Can I learn Python on my phone or tablet?"

You can practice basic syntax using apps like Replit or Pythonista, but to actually learn programming, you need a proper setup — a real keyboard, a code editor, and a terminal. Programming is a craft. You would not learn carpentry by watching videos on your phone.

⚡

Explore the Zen

25 XP
Open your Python terminal (type `python` in your terminal to enter interactive mode) and type: ```python import this ``` Read the output. Pick the one principle that resonates with you most and write it down. Then type: ```python print(2 + 2) print(10 * 5) print("Python" + " is " + "fun") ``` What do each of these three lines output? What does the `+` operator do differently with numbers vs. text? _Hint: With numbers, `+` adds them. With text (strings), `+` glues them together. This is called concatenation._

What you will build in this course

By the end of these 8 modules, you will go from zero to writing a complete Python project that reads real data, cleans it, analyzes it, and produces visualizations. Here is the roadmap:

Why Python
Variables & Types
Control Flow
Functions
Data Structures
Files & Data
Libraries
Final Project
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

Each module builds on the last. By module 8, every concept comes together in a real project you can show to employers.

Key takeaways

  • Python powers Instagram, Netflix, NASA, and most AI/ML work — it is the world's most popular programming language for a reason
  • Readability is Python's superpower — code that looks like English means you spend less time debugging and more time building
  • You need three things to start: Python 3.12+, VS Code with the Python extension, and a terminal — setup takes under 10 minutes
  • Python is the #1 first language at top universities — if you are starting from zero, you picked the right language
  • "Add Python to PATH" — check that box during installation or nothing will work in your terminal
  • Python 2 is dead — only learn Python 3, ignore any resource that uses Python 2 syntax

⚡

Build Your Setup

50 XP
Complete the full setup: install Python 3, install VS Code, install the Python extension, and create a file called `about_me.py` that prints three things about yourself: ```python print("Name: Your Name") print("Goal: Why I am learning Python") print("Fun fact: Something interesting about you") ``` Run the file and verify all three lines appear in your terminal. Take a screenshot — this is your proof that your environment works. _Hint: Save the file with a `.py` extension. Run it by opening the terminal in VS Code (Ctrl+` or Cmd+`) and typing `python about_me.py`._

?

Knowledge Check

1.When Instagram was acquired by Facebook for $1 billion in 2012, what programming language powered its entire backend?

2.What is the most common beginner mistake when installing Python on Windows?

3.What does Python's `print('Hello' + ' ' + 'World')` output?

4.Why is Python often described as a 'Swiss Army knife' of programming?

Next

Variables & Data Types