title: Python: How to compare txt files
body: <p>There are two files a.txt and b.txt. The string in a.txt will be part of the string in b.txt, but not 100% the same</p>
  
  <p>Under a.txt:</p>
  
  <p>192.168.1.1</p>
  
  <p>192.168.1.4</p>
  
  <p>Under b.txt:</p>
  
  <p>./192.168.1.1_Hello</p>
  
  <p>./192.168.1.4_World</p>
  
  <p>./tmp.txt</p>
  
  <p>My final goal is to check the list in b.txt covers all IP in a.txt. If it is not correct, I want the program output those IP to me. Do you guys have any ideas on this ? it seems “diff” command on Python is not a good idea. </p>