a guest Jan 22nd, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def makelist(visited,state): ## note that state is actually a node information: unintentional
- ## misnomer. visited is my node information dictionary.
- direc = state
- ExplList = 
- while not direc == 'LStart':
- direc = visited[direc[-1]]
- ## at this point, I have reconstructed the entire list of nodes. its only filtering
- ## from here on out.
- ExplList2 = 
- for x in range(len(ExplList)):
- if ExplList[x] != 'LStart':
- ExplList2.append(ExplList[x])## taking only the directions from my list of nodes.
- return ExplList1, ExplList2;
RAW Paste Data