title: Python: How to get the actual string from the list object that matches with the given string?
body: <p>I have python code and i am checking if string exists in a given list object and my checking is not case sensitive as shown below.</p>
  
  <pre><code>myTest = "checKING"
  
  lines = [line.rstrip('\n') for line in open('FullList.txt')]
  if myTest.lower() in [x.lower() for x in lines]:
    print("String exist: found")
  </code></pre>
  
  <p>Since this check is not case sensitive so my question is how can i retrieve the string from the list object "lines" that actually matches with the "myTest" string variable?</p>
  
  <p>For e.g. if the "lines" object contains string "CHECKING" than the above condition will pass. How can I retrieve the string "CHECKING" which help passing above "if" condition?</p>