title: In Python, is there a way to validate a user input in a certain format?
body: <p>In python, I'm asking the user to input an office code location which needs to be in the format: XX-XXX (where the X's would be letters)</p>
  
  <p>How can I ensure that their input follows the format, and if it doesn't ask them to input the office code again?</p>
  
  <p>Thanks!</p>