title: The else branch in the if statement doesnt work properly (python)
body: <p>I expect the result will be 'Only accepted the numbers between 1 ~ 6' when I input some number like '9', but the else statement is actually ignored and get through.</p>
  <p>main.py</p>
  <pre><code>def select_class():
  
    while True:
      try:
        class_number = int(input('Select number below\n (1)12:00~13:30\n (2)13:35~15:05\n (3)15:45~17:15\n (4)17:20~18:50\n (5)18:55~20:30\n (6)20:25~22:00\n---------------\n'))
        class_text = input('Leave a comment if you have\n')
    
    if re.match(r'[1-6]', class_number):
      if class_number == 1:
        class_hr, class_min = '00', '00'
        return class_hr, class_min, class_text
      elif class_number == 2:
        class_hr, class_min = '01', '35'
        return class_hr, class_min, class_text
      elif class_number == 3:
        class_hr, class_min = '03', '45'
        return class_hr, class_min, class_text
      elif class_number == 4:
        class_hr, class_min = '05', '20'
        return class_hr, class_min, class_text
      elif class_number == 5:
        class_hr, class_min = '06', '55'
        return class_hr, class_min, class_text
      elif class_number == 6:
        class_hr, class_min = '08', '30'
        return class_hr, class_min, class_text
    else:
      print('Only accepted the numbers between 1 ~ 6')
      return class_number
  except ValueError:
    pass
  </code></pre>
  <p>terminal:</p>
  <p>$ py main.py</p>
  <p>Select number below</p>
  <p>(1)12:00~13:30</p>
  <p>(2)13:35~15:05</p>
  <p>(3)15:45~17:15</p>
  <p>(4)17:20~18:50</p>
  <p>(5)18:55~20:30</p>
  <p>(6)20:25~22:00</p>
  <hr />
  <p>$ 9</p>
  <p>Leave a comment if you have</p>
  <p>$ it failed</p>