# Lesson 7: Graphs: BFS and DFS Graphs: BFS and DFS comes up in almost every real Python project. We start with the why, then write code together. Full lesson: [https://glibcode.net/courses/algorithms/lessons/7](https://glibcode.net/courses/algorithms/lessons/7) ## Files - `graphs.py`: shortest path in an unweighted graph with BFS > **Tip:** Use a virtual environment per project: `python3 -m venv .venv`. > **Tip:** Run `python3 -i file.py` to stay in the interpreter after the program ends and poke at the variables. ## Run it ```sh python3 graphs.py ``` ## Exercises See [exercises.md](exercises.md). Ask in the forum after you have tried.