title: How to extract more than 20 duplicate IP addresses from a text file
body: <p>I have a .txt list of events and I need to make a script that compares the IPs inside the list and if the IPs are seen more than 15 times in different lines then print the line that it's seen in, the ones &lt;15 can be ignored.</p>
  
  <p>The .txt data looks like this:</p>
  
  <pre><code>11/08/2019 07:47    192.168.14.14   tcp/20542   tcp/23  192.168.175.141
  11/08/2019 07:55    192.168.98.105  tcp/38155   tcp/5555    192.168.170.188
  11/08/2019 08:17    192.168.227.10  tcp/2739    tcp/8080    192.168.162.230
  11/08/2019 08:32    192.168.74.26   tcp/52243   tcp/5555    192.168.187.234
  11/08/2019 08:14    192.168.74.26   tcp/58019   tcp/5555    192.168.176.132
  11/08/2019 08:14    192.168.74.26   tcp/58019   tcp/5555    192.168.176.132
  11/08/2019 08:14    192.168.74.26   tcp/58019   tcp/5555    192.168.176.132
  </code></pre>
  
  <p>How can I do this?</p>
  
  <pre><code>from collections import Counter
  
      with open('3.txt') as file:
          c=Counter(c.strip().lower() for c in file if c.strip())
              if c[line[17:31]]&gt;20:
                  print (line)
  </code></pre>
  
  <p>If the IP seen more than 20 times in the lines the results should be like :</p>
  
  <pre><code>11/08/2019 07:55    192.168.98.105  tcp/38155   tcp/5555    192.168.170.188
  </code></pre>