Skip to the workspace
Pebellslearn by building

Python syntax & reference

Find the form you need, compare how it behaves, and open the complete explanation when you need more depth.

Python 3.10+ syntax; individual entries identify newer features. Browser exercises use the configured Python runner.

1 matching syntax entry

Environment and dependency commands

Learn in depth →

A virtual environment isolates an interpreter environment and its installed packages.

python -m venv .venv
python -m pip install package
python -m pip --version

Example

import sys
print(isinstance(sys.executable, str))

Result

True

Watch for: Activate using the command for your shell, or invoke the environment interpreter explicitly. Confirm which interpreter pip installs into.

Practise this topic →
Complete explanation index (91 lessons indexed)

Virtual Environments & Pinned Dependencies

Technical sources and review date

Original Pebells examples. Reviewed 2026-10-28.

Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.