Nearby lessons
1 of 159Python - Introduction
- Understand what Python is and why it is popular
- Learn the history of Python and how it got its name
- Know the main uses and applications of Python
- Understand where Python fits among other programming languages
What is Python?
Python is a programming language that you can use to tell the computer what to do.
Think of it like this — if English is a language you use to talk to people, Python is a language you use to talk to computers.
Python is called a high-level language because it is very close to human language. You don't need to worry about the complex stuff — Python handles it for you.
Here are some quick facts about Python:
- It is free to use — anyone can download and install it
- It is cross-platform — it works on Windows, macOS, and Linux
- It is open-source — a big community of developers maintains it
- It is used by Google, Microsoft, NASA and many other big companies
Why Should You Learn Python?
You might be thinking — why should I learn Python when there are many other languages?
Here is the simple answer — Python is the easiest language to start with, and you can build almost anything with it.
Reason 1: Easy to read and write
Python code looks very similar to English. You can read it and understand what it does, even if you are just starting.
Reason 2: Less code means more productivity
In other languages, you might need 10 lines to do something. In Python, you can do it in 2 or 3 lines. This saves you a lot of time.
Reason 3: Huge demand in the job market
Companies like Google, Netflix, Instagram, Dropbox, and Spotify use Python. If you know Python, there are many job opportunities.
Reason 4: Used in exciting fields
You can use Python for:
- Web development (Django, Flask)
- Data Science and Machine Learning (Pandas, TensorFlow)
- Automation and scripting
- Game development
- Artificial Intelligence (AI)
A Short History of Python
Python was created by Guido van Rossum and first released in 1991. It was named after the British comedy series "Monty Python's Flying Circus."
Key milestones:
- 1991 — Python 0.9.0 released with classes, exception handling, and functions
- 2000 — Python 2.0 added list comprehensions and garbage collection
- 2008 — Python 3.0 released with major improvements and breaking changes
- 2020 — Python 2 reached end of life; Python 3 is now the standard
For the full version timeline, visit Python Versions.
Where Can You Use Python?
Python is one of the most versatile programming languages. It is used across many industries and domains:
- Web Development — Backend APIs, full-stack apps (Django, Flask)
- Data Science & Analytics — Data cleaning, visualization, reporting
- Machine Learning & AI — TensorFlow, PyTorch, scikit-learn
- Automation & Scripting — Task automation, web scraping
- Game Development — Pygame, game logic scripting
- Desktop Applications — GUI tools with Tkinter, PyQt
For a full breakdown of Python's real-world applications, visit Python Applications.
Python vs Other Languages
Let us compare Python with other popular languages so you can understand why Python is a great choice:
| Feature | Python | Java | C++ |
|---|---|---|---|
| Ease of Learning | Very Easy | Moderate | Hard |
| Lines of Code | Few | More | More |
| Readability | Excellent | Good | Low |
| Data Science | Best | Moderate | Limited |
| Web Development | Yes (Django) | Yes (Spring) | Limited |
| Speed | Moderate | Fast | Very Fast |
How Python Works
When you write a Python program, you save it in a file with the .py extension.
Then you ask Python to run it. Python reads your code, converts it into a language the computer understands (called bytecode), and then executes it.
Here is the simple flow:
You write → Python reads → Computer runs
Your First Python Program
Let us write a simple Python program and see what happens.
Open your editor (VS Code, PyCharm, or IDLE) and type this:
How Does This Program Work?
Let us break it down line by line:
print()— This is a built-in function in Python. It tells the computer to show something on the screen."Hello, World!"— This is the text inside quotes. It is a string — which is just a piece of text.- When you run the program, Python prints the text to the output screen.
print("Python is fun")?
Try it yourself!
Python File Types
You will work with two types of Python files:
| File Type | Extension | Purpose |
|---|---|---|
| Source Code | .py | Where you write your program |
| Compiled Bytecode | .pyc | Python converts .py to this for faster execution |
.py files. Python automatically creates .pyc files behind the scenes — you don't need to worry about them.
Where Can You Write Python Code?
You can write Python code in any text editor. But using a good editor makes coding much easier. Here are some popular options:
| Editor / IDE | Best For | Free? |
|---|---|---|
| VS Code | General purpose, very popular | Yes |
| PyCharm | Professional Python development | Community: Yes / Pro: Paid |
| Thonny | Beginners learning Python | Yes |
| Jupyter Notebook | Data Science, learning | Yes |
| IDLE | Comes with Python | Yes |
Summary
Let us quickly recap what we learned in this lesson:
- Python is a free, open-source programming language
- It was created by Guido van Rossum in 1989
- The name comes from "Monty Python's Flying Circus" — not the snake
- Python is used for web apps, data science, AI, automation, and more
- Python files use the
.pyextension - You can write Python code in VS Code, PyCharm, Thonny, or IDLE
- Python is a free, open-source, easy-to-learn programming language
- Python reads almost like English — a great first language for beginners
- It works on Windows, macOS, and Linux — truly cross-platform
- Python files use the .py extension
- The name "Python" comes from a comedy show, not the snake