I read Python Patterns - Implementing Graphs. However this implementation is inefficient for getting the edges that point to a node.
In other languages a common solution is using a two-dimensional array, but to do this in Python would require a list of lists. This does not seem pythonic.
What is an implementation of a directed graph in python where finding all the nodes with edges to and from a node (as two separate lists) is fast?
