title: Is there a better way to check months and days to print the seasons in python? I cant use def and class or loops
body: <p>I am writing a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. This is for a school project, while this works it seems a little overkill, is there a better way to get the same results? without using def, class or loops. If not, if you could just let me know its not possible.</p>
  <pre class="lang-py prettyprint-override"><code>input_month = input()
  input_day = int(input())
  
  spring = ['March', 'April', 'May', 'June']
  summer = ['June', 'July', 'August', 'September']
  autumn = ['September', 'October', 'November', 'December']
  winter = ['December', 'January', 'February', 'March']
  if input_month in spring + summer + autumn + winter:
      if (input_day &gt; 31) or (input_day &lt;= 0):
          print('Invalid')
      elif (input_month == spring[0]) and (input_day &gt;= 20):
          print('Spring')
      elif (input_month == spring[1]) and (input_day &lt;= 30):
          print('Spring')
      elif (input_month == spring[2]) and (input_day &gt;= 31):
          print('Spring')
      elif (input_month == spring[3]) and (input_day &lt;= 20):
          print('Spring')
  
      elif (input_month == summer[0]) and (input_day &gt;= 21):
          print('Summer')
      elif (input_month == summer[1]) and (input_day &lt;= 31):
          print('Summer')
      elif (input_month == summer[2]) and (input_day &lt;= 31):
          print('Summer')
      elif (input_month == summer[3]) and (input_day &lt;= 21):
          print('Summer')
  
      elif (input_month == autumn[0]) and (input_day &gt;= 22):
          if input_day &gt;= 31:
              print('Invalid')
          else:
              print('Autumn')
      elif (input_month == autumn[1]) and (input_day &lt;= 31):
          print('Autumn')
      elif (input_month == autumn[2]) and (input_day &lt;= 30):
          print('Autumn')
      elif (input_month == autumn[3]) and (input_day &lt;= 20):
          print('Autumn')
  
      elif (input_month == winter[0]) and (input_day &gt;= 21):
          print('Winter')
      elif (input_month == winter[1]) and (input_day &lt;= 31):
          print('Winter')
      elif (input_month == winter[2]) and (input_day &lt;= 28):
          print('Winter')
      elif (input_month == winter[3]) and (input_day &lt;= 19):
          print('Winter')
      else:
          print('Invalid')
  </code></pre>