title: Get lines where the condition of i and j match
body: <p>Print each output once:</p>
  
  <pre><code> f1=['part3_pl', 
       'part2_pl', 
       'part3_pl_to_p', 
       'part2_pl_to_p', 
       'part3_pl_to_p_lack', 
       'part2_pl_to_p_lack']
  
  
  for i in f1:
      for j in f1:
          if i.endswith('pl') and j.endswith('pl_to_p'):
              print(i,j,i+'_output')
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>part3_pl part3_pl_to_p part3_pl_output
  part3_pl part2_pl_to_p part3_pl_output
  part2_pl part3_pl_to_p part2_pl_output
  part2_pl part2_pl_to_p part2_pl_output
  </code></pre>
  
  <p>I would like to print each line once.</p>
  
  <p>Correct output:</p>
  
  <pre><code>part3_pl part3_pl_to_p part3_pl_output
  part2_pl part2_pl_to_p part2_pl_output
  </code></pre>