Objective

Learn Python basics including syntax, variables, and running scripts.

Tools & Technologies

  • Python 3
  • pip
  • REPL
  • venv

Key Commands

python3 --version
python3 -c 'print("Hello")'
python3 script.py
python3 -m venv env && source env/bin/activate

Lab Steps

01
Install Python

Verify Python 3 installation and set up a virtual environment.

02
REPL Exploration

Use the interactive interpreter to test expressions and built-ins.

03
Write First Script

Write and execute a .py script with variables and print statements.

04
pip Basics

Install packages with pip and manage requirements.txt.

Challenges Encountered

  • venv activation differs on Windows vs Unix
  • pip vs pip3 confusion on dual-version systems

Key Takeaways

  • Virtual environments isolate project dependencies
  • Python 3.10+ has better error messages — use it