Using try and except to verify user’s input in Python

I’m doing a school project and the user will need to input some values (1, 2 or 3 and their combinations separated by comma). Ex: 2,3,1 or 2,1 I need to prevent the user from typing anything else out …

Multiple try codes in one block

I have a problem with my code in the try block. To make it easy this is my code: try: code a code b #if b fails, it should ignore, and go to c. code c #if c fails, go to d code d …