Python Introduction
Python is a popular, high-level programming language that is easy to read and easy to learn. It is free, open source and runs on Windows, macOS and Linux. Many beginners start programming with Python, because the code looks close to normal English.
Python is used for web development, data analysis, machine learning, automation, scripting, games and much more.
A short history of Python
- Python was created by Guido van Rossum. He started working on it in the late 1980s as a successor to the ABC language.
- The first public version (0.9.0) came out in February 1991. It already had classes, exception handling, functions and data types like list and dictionary.
- Python 2.0 was released in 2000, and Python 3.0 in December 2008.
- Python 2 is no longer supported since 2020. Always use Python 3, and all our tutorials use Python 3.
Features of Python
- Simple syntax: short code, close to English, and easy for beginners.
- Interpreted: the code runs directly, line by line, with no separate build step.
- Dynamically typed: you do not need to declare the type of a variable.
- Multi-style: supports procedural, object-oriented and functional programming.
- Big standard library and community: thousands of ready-made modules and packages.
- Cross-platform: the same program runs on different operating systems.
You can read the same list as an interview answer in What are the key features of Python?
What can you build with Python?
| Area | Examples |
|---|---|
| Web development | Django, Flask, FastAPI |
| Data and AI | NumPy, pandas, scikit-learn, TensorFlow |
| Automation | Scripts to rename files, send emails, read Excel sheets |
| Testing and DevOps | Test tools and server scripts |
| Learning programming | Great first language in schools and colleges |
Check if Python is installed
Open the terminal (or Command Prompt on Windows) and type this command.
python --version
If Python is installed, you will see a version number like the one below. Your version may be different. On macOS and Linux you may need to type python3 instead of python.
Python 3.12.3
If it is not installed, download it free from python.org.
Your first Python program
Create a file named hello.py and write this line in it.
print("Hello, World!")
Run it from the terminal with python hello.py.
Hello, World!
The print() function shows the text on the screen. That is all you need for a first program. Next, learn the rules of the language in Python Syntax.
Summary
- Python is a simple, free and powerful language created by Guido van Rossum.
- Use Python 3 only.
- It is used in web, data, automation and many other fields.
- You run a program with
python filename.py.
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |