Making an adjacency list python