← Back to Python Course | Chapter 1: Basics | Lesson 2 of 14

Python History & Features

Python was invented by a programmer who wanted a language that was fun and easy to read, and it has grown a lot since. Its features are like a toolbox that makes writing programs quicker and simpler.

History of Python

Dutch programmer Guido van Rossum began designing Python in December 1989 as a hobby project to fill his Christmas week, and released version 0.9.0 publicly in 1991.

The name comes from the British comedy troupe Monty Python, not the snake, reflecting van Rossum's goal of a language that didn't take itself too seriously.

Example: History of Python

python
# Created by Guido van Rossum, first released in 1991
# Named after the comedy troupe Monty Python, not the snake
print("Python: born 1991, named after Monty Python")

Interpreted Language

Because an interpreter executes code directly rather than requiring a separate compile step, you can change a line and immediately re-run the script to see the effect.

This tight feedback loop is a big part of why Python feels productive for prototyping, scripting, and teaching.

Example: Interpreted Language

python
x = 5
print(x)
# Change the value above and rerun -- no compile step needed
x = 10
print(x)

Dynamic Typing

You never write int x or String name in Python — the interpreter inspects the value on the right side of an assignment and binds the variable to whatever type that value is.

This makes code shorter to write, but it also means type-related bugs surface at runtime instead of being caught before the program runs.

Example: Dynamic Typing

python
x = 5  # x starts out as an integer
print(type(x))  # shows <class 'int'>
x = "hello"  # same variable is reassigned to a string
print(type(x))  # shows <class 'str'>, proving Python is dynamically typed

Object-Oriented Programming

Object-oriented programming lets you bundle related data and behavior together into classes, which Python fully supports alongside procedural and functional styles.

This flexibility means you can start with simple scripts and grow into full class-based designs as a project's complexity increases.

Example: Object-Oriented Programming

python
class Dog:  # define a Dog class
    def __init__(self, name):  # constructor runs when a new Dog is created
        self.name = name  # store the dog's name on the instance

    def bark(self):  # method that prints a bark message
        print(self.name, "says woof")

Dog("Rex").bark()  # create a Dog named Rex and call its bark method

Standard Library Support

Python's standard library ships with modules for tasks like file I/O, regular expressions, networking, JSON parsing, and math — all installed automatically, no extra download required.

This 'batteries included' philosophy is a major reason simple scripts can be written with zero third-party dependencies.

Example: Standard Library Support

python
import json  # module to convert Python objects to JSON text
import math  # module with math constants and functions
data = json.dumps({"pi": math.pi})  # convert a dict containing pi to a JSON string
print(data)
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
Common Mistakes
  1. Assuming Python is slow because it is interpreted and therefore unsuitable for anything, when heavy work is usually done by C-backed libraries such as NumPy.
  2. Writing Python 2 syntax like print "hello" or raw_input(), which fails in Python 3 (print("hello"), input()).
  3. Believing dynamic typing means no types exist, then being surprised when "5" + 5 raises a TypeError.

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.