Python Tutorial - Python Introduction
๐ Python Programming Language - Complete Introduction
๐ What is Python?
Python ek high-level, interpreted, general-purpose programming language hai jo Guido van Rossum ne 1991 mein develop kiya tha.
High-level ka matlab hai ki Python human-readable hai - English sentences jaisi lagti hai!
๐ฏ Python Ki Khaasiyatein (Features)
Key Features
| Feature | Description |
|---|---|
| Easy to Learn | Simple syntax, jaise English! |
| Interpreted | Line-by-line execute hoti hai |
| Dynamically Typed | Variable type declare nahi karna padta |
| Object-Oriented | Classes aur objects support karta hai |
| Portable | Har platform par chalti hai (Windows, Mac, Linux) |
๐ Python Ka Use Kahan Hota Hai?
- ๐ Web Development - Django, Flask frameworks
- Instagram, Spotify, Pinterest - sab Python mein!
- ๐ค Artificial Intelligence & Machine Learning
- ChatGPT, Google AI - Python use karte hain
- Libraries: TensorFlow, PyTorch, Scikit-learn
- ๐ Data Science & Analytics
- Data visualization, analysis, predictions
- Libraries: Pandas, NumPy, Matplotlib
- ๐ฎ Game Development - Pygame library
- ๐ง Automation & Scripting - Repetitive tasks automate karna
- ๐ฅ๏ธ Desktop Applications - Tkinter, PyQt
๐ก Interpreted vs Compiled Language
Interpreted Language Kya Hai?
Python ek interpreted language hai. Iska matlab:
- Code line-by-line execute hota hai
- Pehle compile karne ki zarurat nahi
- Quickly test kar sakte ho
- Aasani se debug kar sakte ho
Comparison: Interpreted vs Compiled
| Interpreted (Python) | Compiled (C, C++) |
|---|---|
| Line-by-line chalta hai | Pura code pehle compile hota hai |
| Slow execution | Fast execution |
| Easy debugging | Debugging difficult |
| Platform independent | Platform specific |
๐ Python Versions
โ ๏ธ Python 2 vs Python 3
Python 2 (2000-2020) - Ab discontinued hai โ
Python 3 (2008-Present) - Ye use karo! โ
Major difference: print statement syntax
Python 2: print "Hello"
Python 3: print("Hello") # Function call
โจ Your First Program
Hello World in Python
print("Hello, World!")
print("Main Python seekh raha hoon!")
print("Yeh bahut aasan hai!")
Output:
Hello, World! Main Python seekh raha hoon! Yeh bahut aasan hai!
Remember: Python mein
print() ek built-in function hai jo screen par output dikhata hai!
๐ Fun Fact!
Python ka naam "Monty Python's Flying Circus" comedy show se aaya hai, saanp se nahi! Guido van Rossum ko wo show pasand tha! ๐
Example
print("Hello, Python!")