So I have the file below with the following values. What I am trying to do is to put these int values into a dictionary.
0 0
0 1
0 2
0 3
0 4
1 1
1 2
1 3
1 4
1 5
2 3
2 4
3 3
4 5
5 0
I want my dictionary to look something along the lines of...
graph = {0: [0,1,2,3,4],1: [1,2,3,4,5], 2: [3,4] .... and so on.
I am currently using code from the following question.
But it is not doing exactly what I was hoping. Any help would be great.