Last active
September 6, 2024 13:31
-
-
Save RobertTalbert/5c304b12310c123fee8d7829b880e61c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python code for MTH 325 F24 Homework 5 | |
## 1. Iterating through a list | |
vertex_list = [(2,3), (2,4), (4,5), (1,3)] | |
for vertex in vertex_list: | |
print(vertex[1]) | |
## 2. A dictionary | |
my_graph = { | |
"a" : ["b", "c"], | |
"b" : ["a", "d"], | |
"c" : ["a", "d"], | |
"d" : ["e"], | |
"e" : ["d"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment