What is Python
Python is a high-level, interpreted, interactive, and object-oriented programming language. Python was created by Guido van Rossum in the late 1980s and first released in 1991.
One of Python's main strengths is its design philosophy, which emphasizes code readability. Python uses indentation to define code blocks, not curly braces or keywords, so the code you write looks clean and consistent. This makes it easy for even beginner programmers to read and understand code written by others.
Python's ecosystem is very rich, thanks to thousands of third-party libraries available through PyPI (Python Package Index). You can install these libraries using pip, Python's built-in package manager. From web development, data analysis, and artificial intelligence to task automation — there is already a library for everything.
Python Key Features:
- Easy to learn and read
- Interpreted — no compilation needed
- Object-oriented
- Dynamic language with dynamic typing
- Very extensive standard library support
- Open source and free
- Runs on multiple platforms
Python Use Cases:
- Web Development (Django, Flask)
- Data Science & Analysis (Pandas, NumPy)
- Artificial Intelligence & Machine Learning (TensorFlow, PyTorch)
- Automation & Scripting
- Desktop Development (Tkinter, PyQt)
Code Example
# Your first Python program
print("Hello, World!")
print("Welcome to Python.")
Code Explanation
The code above is the simplest Python program. The first line is a comment that starts with # — comments are not executed by the interpreter and serve as notes for the programmer. The next two lines use the print() function, which is Python's built-in function for displaying text on the screen. This function takes one string (text) argument and prints it directly to the console.
Everyday Example
The print() program is often used for quick debugging. For example, you are building a simple calculator app for a grocery store. You can print the temporary result of each calculation step to the screen to make sure the code is working correctly:
total_spent = 50000 + 25000 + 15000 # purchase total
discount = total_spent * 0.1 # 10% discount
final_total = total_spent - discount
print("Total amount due:", final_total)
Summary
Python is a beginner-friendly language yet remains powerful for professional projects. With simple syntax, a complete library ecosystem, and a large community, Python is the right choice to start your programming journey. Get ready to dive deeper in the upcoming lessons.