title: Extract specific word and the value after it from text file
body: <p>I have the input file as:</p>
  
  <pre><code>1 sentences, 6 words, 1 OOVs
  1 zeroprobs, logprob= -21.0085 ppl= 15911.4 ppl1= 178704
  6 words, rank1= 0 rank5= 0 rank10= 0
  7 words+sents, rank1wSent= 0 rank5wSent= 0 rank10wSent= 0 qloss= 0.925606 absloss= 0.856944
  
  file input.txt : 1 sentences, 6 words, 1 OOVs
  1 zeroprobs, logprob= -21.0085 ppl= 15911.4 ppl1= 178704
  6 words, rank1= 0 rank5= 0 rank10= 0
  7 words+sents, rank1wSent= 0 rank5wSent= 0 rank10wSent= 0 qloss= 0.925606 absloss= 0.856944
  </code></pre>
  
  <p>I want to extract the word ppl and the value coming after it, in this case: ppl=15911.4 </p>
  
  <p>I am using this code:</p>
  
  <pre><code>with open("input.txt") as openfile:
      for line in openfile:
         for part in line.split():
            if "ppl=" in part:
                print part
  </code></pre>
  
  <p>However this is only extracting the word ppl but not the value. I would also like to print the file name along. </p>
  
  <p>Expected Output:</p>
  
  <pre><code>input.txt, ppl=15911.4
  </code></pre>
  
  <p>How can I fix this? </p>