Lesson 1 of 40
Foundations
Beginner
โฑ 20 min
Python & VS 2026 โ Getting Started
Install Python 3.13, configure Visual Studio 2026, and write your first Python script. Learn the REPL, virtual environments, and project structure.
Part 1: Installing Python 3.13 & Setting Up VS 2026
Download Python 3.13 from python.org and check "Add python.exe to PATH" during install. In Visual Studio 2026, install the Python development workload.
Verify your install:
Verify your install:
# In VS 2026 Terminal (Ctrl+backtick)
python --version # Python 3.13.x
pip --version # pip 24.x
python --version # Python 3.13.x
pip --version # pip 24.x
Part 2: Your First Python Program
Create
hello.py in VS 2026 and run with F5:# hello.py
print("Hello, Python!")
# f-strings โ Python's string interpolation
name = "World"
print(f"Hello, {name}! Python 3.13 is here.")
# Multi-line f-string (Python 3.12+)
msg = f"""
Language: Python
Version: 3.13
"""
print(msg)
print("Hello, Python!")
# f-strings โ Python's string interpolation
name = "World"
print(f"Hello, {name}! Python 3.13 is here.")
# Multi-line f-string (Python 3.12+)
msg = f"""
Language: Python
Version: 3.13
"""
print(msg)
Part 3: Virtual Environments with uv
uv is the modern, fast Python package manager. Install it and create a project:# Install uv (fast Python package manager)
pip install uv
# Create a new project
uv init myproject
cd myproject
# Add dependencies
uv add requests fastapi
# Activate (traditional venv)
python -m venv .venv
.venvScriptsactivate # Windows
pip install uv
# Create a new project
uv init myproject
cd myproject
# Add dependencies
uv add requests fastapi
# Activate (traditional venv)
python -m venv .venv
.venvScriptsactivate # Windows
Part 4: Python Project Structure
| File/Folder | Purpose |
|---|---|
pyproject.toml | Project metadata & dependencies (modern standard) |
src/myapp/ | Your package code |
tests/ | pytest test files |
.venv/ | Virtual environment (do not commit) |
requirements.txt | Legacy dependency list (use pyproject.toml instead) |
๐ Want the complete guide with projects?
Get the book โ