Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a in graph:
- if "A" in a[0]:
- startingNodes.append(a)
- for a in startingNodes:
- for b in graph:
- if b[0] == a[1]:
- for c in graph:
- if c[0] == b[1]:
- for d in graph:
- if d[0] == c[1]:
- if d[1] == "C":
- route = (a,b,c,d)
- endRoutesFound.append(route)
- final_routes = []
- for num in endRoutesFound:
- if num not in final_routes:
- final_routes.append(num)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement