Getting Started

Introduction to Python

Learn what Python is, its history, features, and why it's one of the most popular programming languages in the world.

Introduction to Python

Python is a high-level, interpreted, general-purpose programming language created by Guido van Rossum and first released in 1991. It emphasizes code readability and simplicity, making it one of the most beginner-friendly and widely-used languages in the world.


What is Python?

Python is an interpreted language, meaning your code is executed line by line without a separate compilation step. It supports multiple programming paradigms including procedural, object-oriented, and functional programming.

python
# Your first Python program
print("Hello, World!")

Running this single line will output:

Hello, World!

History of Python

YearMilestone
1989Guido van Rossum begins working on Python
1991Python 0.9.0 released
2000Python 2.0 released (list comprehensions, garbage collection)
2008Python 3.0 released (major backwards-incompatible release)
2020Python 2 reaches end of life
2024Python 3.12+ is the current standard

Note: Always use Python 3.x for new projects. Python 2 is no longer maintained.


Key Features of Python

1. Simple and Readable Syntax

Python uses indentation (whitespace) to define code blocks instead of curly braces, making it very readable:

python
# Python - clean and readable
if True:
    print("Python is simple!")

2. Interpreted Language

No compilation step is needed. You write code and run it immediately, which makes development faster.

3. Dynamically Typed

You don't need to declare variable types — Python infers them at runtime:

python
x = 10        # int
x = "hello"   # now it's a string - no error!

4. Extensive Standard Library

Python comes with a huge standard library often referred to as "batteries included":

python
import math
import datetime
import json
import os

print(math.sqrt(144))  # 12.0
print(datetime.date.today())  # 2026-02-15

5. Cross-Platform

Python runs on Windows, macOS, Linux, and many other platforms without modification.

6. Large Ecosystem

Over 400,000+ packages are available on PyPI (Python Package Index) for virtually any task.


What Can You Build With Python?

Python is incredibly versatile. Here are some major areas:

DomainExamplesPopular Libraries
Web DevelopmentWebsites, REST APIsDjango, Flask, FastAPI
Data ScienceData analysis, visualizationPandas, NumPy, Matplotlib
Machine LearningAI models, deep learningTensorFlow, PyTorch, scikit-learn
AutomationScript tasks, web scrapingSelenium, BeautifulSoup, requests
Desktop AppsGUI applicationsTkinter, PyQt, Kivy
DevOpsInfrastructure, CI/CDAnsible, Fabric
Game Development2D gamesPygame

Python vs Other Languages

python
# Python
numbers = [1, 2, 3, 4, 5]
squared = [n ** 2 for n in numbers]
print(squared)  # [1, 4, 9, 16, 25]
java
// Java - same task requires much more code
import java.util.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) {
        List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> squared = numbers.stream()
            .map(n -> n * n)
            .collect(Collectors.toList());
        System.out.println(squared);
    }
}

Python achieves the same result with significantly less code, making development faster and more enjoyable.


Who Uses Python?

Python is used by major companies and organizations worldwide:

  • Google — Core infrastructure, AI/ML research
  • Netflix — Recommendation algorithms, data pipelines
  • Instagram — Backend (Django)
  • NASA — Scientific computing
  • Spotify — Data analysis, backend services
  • Dropbox — Desktop client, server-side code

Python 2 vs Python 3

FeaturePython 2Python 3
Printprint "hello"print("hello")
Division5/2 = 25/2 = 2.5
UnicodeASCII by defaultUnicode by default
StatusEnd of life (2020)Actively developed

Important: This entire tutorial series uses Python 3. Make sure you have Python 3.8 or higher installed.


Summary

  • Python is a high-level, interpreted, dynamically-typed programming language
  • Created by Guido van Rossum in 1991
  • Known for its clean, readable syntax
  • Used in web development, data science, AI, automation, and more
  • Has a massive ecosystem of libraries and frameworks
  • Always use Python 3 for new projects
  • Perfect language for beginners and experienced developers alike

In the next topic, we'll set up your Python development environment so you can start writing and running Python code.