Learn programming concepts interactively
#!/usr/bin/env python3# Python Command Line Usage Examples# === BASIC INVOCATION ===# Start interactive Python sessionpython# Check Python versionpython --version // or python -V# Get help informationpython -h# === SCRIPT EXECUTION ===# Run a Python scriptpython script.py# Run script with argumentspython script.py arg1 arg2# === INLINE CODE EXECUTION ===# Execute code directly from command linepython -c "print('Hello, World!')"# Multiple statements with semicolonspython -c "import math; print(math.pi)"# === MODULE EXECUTION ===# Run built-in modulespython -m http.server 8000python -m pip install packagepython -m timeit "sum(range(100))"# === DEBUGGING & DEVELOPMENT ===# Interactive mode after script executionpython -i script.py# Unbuffered output (for real-time monitoring)python -u long_running_script.py# Verbose mode (show import details)python -v script.py# === ENVIRONMENT CONTROL ===# Ignore environment variablespython -E script.py# Isolated mode (no user site-packages)python -I script.py# Optimize bytecode (remove assert statements)python -O script.py# === PRACTICAL EXAMPLES ===
No operations yet
Start by adding or modifying elements