title: Change up the user input in python
body: <p>I'm currently working on a code, where the user is able to search through a dictionary with an input and keywords to get the corresponding line number in return. The keywords are actually in the line. 
  Using this code:</p>
  
  <pre><code>usr_in = input('enter text to search: ') 
  
  print('That text is found at line(s) {}'.format
                 ( [v for k,v in my_dict.items() if usr_in in k]))
  </code></pre>
  
  <p>Now I also want to have another user input right after this one, where the user can type in the number of the line and in return the whole line shows up as an output. I've tried to alter the code above, but without results.</p>
  
  <p>The altered version:</p>
  
  <pre><code>usr_in_line = input('Please enter the line number: ')
  
  print('Corresponding Line {}'.format(
           [k for v,k in my_dict.items() if usr_in_line in v]))
  </code></pre>
  
  <p>The whole code can be found here: <a href="https://stackoverflow.com/questions/49287058/is-it-possible-to-save-the-print-output-in-a-dict-with-python/49287082?noredirect=1#comment85615605_49287082">Is it possible to save the print-output in a dict with python?</a></p>