I'm working on a small project in python, and after a bit of work on it I was wondering if there was a way of inputting data in python 3 which was somewhat similar to batch's choice command. Pretty much only take in one key of input and then end the input prompt.
For example:
Choice(['Y', 'N'], "Yes or No? ")
Where the user could either press "Y" or "N" and the program would continue.
I've done some brief surfing, but haven't found anything I can use.
Bonus:
What would be even more useful is if this "choice" command could except multiple characters.
Pretty much input
but capping the limit of characters they can input, and then immediately continuing. The latter of which is proving to be hard.
Thanks in advance, Mona