title: list index out of range when compared against dictionary
body: <p>I'm trying to create a menu system in Python 3.7 using dictionary variables and inputs, new coder just scratching their head</p>
  <p>I'm trying to save the users choice in the var <strong>choice</strong> then use <strong>choices</strong> to compare against to scrub inputs, however when ran the code fails consistently with</p>
  <pre><code>Traceback (most recent call last):
    File &quot;D:\Nu Voute De Merde\[Redact]\Python Creations\[Redact]\code.py&quot;, line 32, in &lt;module&gt;
      if choice == choices[5]:
  IndexError: list index out of range
  </code></pre>
  <p>Any help would be greatly appreciated!
  code:</p>
  <pre><code>from sys import exit
  ## Creates the menu using dict vars
  menu = {}
  menu['1']=&quot;Add New Address&quot;
  menu['2']=&quot;Change Existing Address&quot;
  menu['3']=&quot;View All Addresses Where Last Name Starts With Letter&quot;
  menu['4']=&quot;List All Addresses&quot;
  menu['5']=&quot;Quit&quot;
  
  #Takes the input from the user
  choice = int(input(&quot;&quot;&quot;
   1.Add New Address
   2.Change Existing Address
   3.View All Addresses Where Last Name Starts With Letter
   4.List All Addresses
   5.Quit
      &quot;&quot;&quot;))
  #Sets available options
  choices = [1, 2, 3, 4, 5]
  
  
  if choice == choices[1]:
     print (menu['1'])
  if choice == choices[2]:
     print (menu['2'])
  if choice == choices[3]:
     print (menu['3'])
  if choice == choices[4]:
     print (menu['4'])
  if choice == choices[5]:
     print (menu['5'])
     exit()
  elif choice not in choices:
     print (menu['5'])
     exit()
  </code></pre>