Here's my current code:
class city1:
dict = {"north":"city2", "east": 0, "south": 0, "west": "city3"}
validcmds = ['north', 'east', 'south', 'west']
input=raw_input(">>")
input=set(input.split())
validcmds=set(validcmds)
output = list(validcmds.intersection(input))
print city1.dict(output)
I don't know what's wrong with this line:
print city1.dict(output)
Basically I just want the output to be looked up in the dict in the city1 class. It's for my texted based RPG :)