title: How to create multiple dictionaries and search them in Python
body: <p>I am trying to write a program using dictionaries that will allow the user to enter a course and section number which then returns the information about the course. For example if the user enters 10851_01L it the program should return: "The course is MIS113 with Professor Beaudry locate in OW206"
  This is the following code I am using. Upon running the program I am getting a KeyError for the class that the CRN_SEC number was entered for. </p>
  
  <pre><code>def main():
      course = create_course()
      instructor = create_instructor()
      location = create_location()
      search = input('Please enter a CRN and section Key, input must be formatted as CRN_SEC: ')
      value = course[search]
      print(instructor[value])
      print(location[value])
  def create_course():
      return {'10193_01W':'MIS102', '10227_01W':'MIS103', '10850_01':'MIS113', 
      '10851_01L':'MIS113', '10511_01':'MIS118', '10512_01L':'MIS118', '11263_01W':'MIS145', 
      '10780_01W':'MIS206', '11015_01W':'MIS251', '10385_01':'MIS255', '10513_01W':'MIS273', 
      '10514_01L':'MIS273', '11479_01W':'MIS275', '11934_01W':'MIS285', '10325_01':'MIS311', 
      '10333_01W':'MIS311', '10596_01W':'MIS322', '11797_01W':'MIS341', '11480_01W':'MIS344', 
      '11129_01W':'MIS407', '11964_02W':'MIS407', '10809_01W':'MIS442', '10852_01':'MIS496'}
  def create_instructor():
      return {'10193_01W':'Huntley', '10227_01W':'Huntley', '10850_01':'Beaudry', 
      '10851_01L':'Beaudry', '10511_01':'MacDougal', '10512_01L':'MacDougal', '11263_01W':'Carrere', 
      '10780_01W':'Kirby', '11015_01W':'Coon', '10385_01':'Dickson', '10513_01W':'MacDougal', 
      '10514_01L':'MacDougal', '11479_01W':'Stewart', '11934_01W':'Dickson', '10325_01':'Coon', 
      '10333_01W':'Kirby', '10596_01W':'Kirby', '11797_01W':'Stewart', '11480_01W':'Dickson', 
      '11129_01W':'Stewart', '11964_02W':'Stewart', '10809_01W':'Dickson', '10852_01':'Dickson'}
  def create_location():
      return {'10193_01W':'Web', '10227_01W':'Web', '10850_01':'OW206', '10851_01L':'OW206',
      '10511_01':'BH124', '10512_01L':'OW206', '11263_01W':'Web', '10780_01W':'Web', 
      '11015_01W':'Web', '10385_01':'OW223', '10513_01W':'OW112', '10514_01L':'OW112', 
      '11479_01W':'Web', '11934_01W':'Web', '10325_01':'OW216', '10333_01W':'Web',
      '10596_01W':'Web', '11797_01W':'Web', '11480_01W':'Web', '11129_01W':'Web',
      '11964_02W':'Web', '10809_01W':'Web', '10852_01':'OW123'}    
  main()
  </code></pre>