I\'ve coded my first slightly-complex algorithm, an implementation of the A Star Pathfinding algorithm. I followed some Python.org advice on implementing graphs so a diction
An easy optimization is to use sets instead of lists for the open and closed sets.
openSet = set() closedSet = set()
This will make all of the in and not in tests O(1) instead of O(n).
in
not in