I'm working on a Python script for school and I need it to check the input format in order to perform an action.
Let me exemplify:
The script will ask the user for an input that can either be an id number or a registration number, then, if it's an ID number, it will query a specific database for something, and if it's a registration number, it will query a different database for something else.
The ID number format is: XXX.XXX.XXX-XX and the registration number format is: XX.XXX.XXX/XXXX-XX.
Any ideas?
[EDIT]
Ok, so I just realized I don't necessarily need to check if the format is correct, since the registration number has more characters than the ID number. Now, how can I have an if statement check the amount of characters in an input?