I have a string input by a user (e.g. "MMXVII"
), then I make it an array using list(User_input)
. Now, I want to check if each character the user has input matches one of the characters in another array containing allowed characters.
So I'd have two lists:
List_Permitted_Characters = ["M", "G", etc . ]
User_input = ["M", "M, "X", "V", "I", "I"]
I need to check if every character in User_input
is one of the ones in List_Permitted_Characters
I'm quite new to programming and python, so I'm sorry if this information isn't very helpful.