Representing graphs (data structure) in Python
Even though this is a somewhat old question, I thought I’d give a practical answer for anyone stumbling across this. Let’s say you get your input data for your connections as a list of tuples like so: [(‘A’, ‘B’), (‘B’, ‘C’), (‘B’, ‘D’), (‘C’, ‘D’), (‘E’, ‘F’), (‘F’, ‘C’)] The data structure I’ve found to … Read more