Hello, I am doing a school project and need assistance on validating raw input, this is very simple stuff, but can someone answer this for me?
The statement is:
ordertype = str(input("Is the order pickup or delivery?"))
Only two values could be entered: P or D (or p or d), if something else is entered, (eg. K) then a statement like "You can only enter P or D" should be displayed, and the question should be asked again.
I have tried the whole if in list thing, but it didn't seem to work.
Could someone please post the answer to this in Code?