Python
Introduction
Python is a versatile, high-level programming language known for its readability and extensive library ecosystem.
Key Features
- Easy to learn syntax
- Dynamic typing
- Extensive standard library
- Cross-platform compatibility
Basic Syntax
# Variables
name = "Python"
version = 3.11
# Functions
def greet(name):
return f"Hello, {name}!"
# Classes
class Developer:
def __init__(self, name):
self.name = name
def code(self):
return f"{self.name} is coding"
# List comprehension
squares = [x**2 for x in range(10)]
Popular Libraries
- Web: Flask, Django, FastAPI
- Data Science: Pandas, NumPy, Matplotlib
- ML/AI: TensorFlow, PyTorch, scikit-learn
- Automation: Selenium, Requests, BeautifulSoup