title: How can I create a dictionary and output values using user input?
body: <p>I want to make a dictionary and then use user input to print the value of the key</p>
  
  <p>Edit: I'm using Python 3.4.4
  And thanks to the user who corrected grammatical and syntactical errors</p>
  
  <p>*I tried to use the -input()- but with no luck
  *I found this code:</p>
  
  <pre><code>usrInp = 'z' #default value z so that while works first time
  exDict = {}  #initializing empty dict
  
  while usrInp == 'z':
      key = input('enter key : ')
      val = input('enter val : ')
      exDict[key] = val
      usrInp = input('Enter z to continue adding, else any input to exit : ')
  
  print(exDict)
  </code></pre>
  
  <p>But it is not what I want. My goal is to do something like this:</p>
  
  <pre><code> dictionary{
       1:"Number one"
       2:"Number two"
       3:"Number three"
  }
  
  #Asking for user input code here
  
  print() #Print the value of the key here
  </code></pre>