title: Terminating raw_input based on the ascii value of the string
body: <p>I am new to python.
  My Issue- <strong>need to terminate the raw_input if no input is passed</strong>
  I am basically asking user for number of key-value pairs to be added to dictionary. Then adding the key-value pairs in dictionary. Later querying the dictionary which should result value if key exist, else print <code>Not found</code>.</p>
  
  <p>I searched the Stack Overflow and found solution in terms of timer but I am trying to use ord function to get ascii value of string and check it against null that is ascii value of 0. My code does not seem to terminate, please advice on necessary changes in code.</p>
  
  <p>Please find the code that I am using in the program:</p>
  
  <pre><code>def convert_to_ascii(text):
      return "".join(str(ord(char)) for char in text)
  
  
  n=int(raw_input().rstrip())
  phonebook = dict(raw_input().split() for i in range(n))
  print phonebook
  
  
  list1=[]
  while True:
       choice = raw_input()
       temp=convert_to_ascii(choice)
       print temp
       if temp != '0':
          list1.append(choice)
       else:
           break
  
  for word in list1:
      if word in phonebook :
         print '{0}={1}'.format(word,phonebook[word])
      else:
          print 'Not found'
  </code></pre>