new to python and trying to think up how to approach having a list of valid characters allowed for a key within my dictionary.This key can be any combination of the characters all the way down to a single character or empty.
For example:
allowedWalkingDirection['N','n,'S','s','E','e','W','w']
def isRotateValid(path):
if allowedWalkingDirection in path['walk']:
return path
return False
And so if I try say: {'rotate':'WeNsE'} my input says it isn't valid. I'm sorry if this isn't very clear and concise, in short, my goal is to allow the valid walking directions to be input however many times within my key, but it's currently only allowing one character in the string.