How to delete line from the file in python
<p>I have a file F, content huge numbers e.g F = [1,2,3,4,5,6,7,8,9,...]. So i want to loop over the file F and delete all lines contain any numbers in file say f = [1,2,4,7,...].</p>

<pre><code>F = open(file)
f = [1,2,4,7,...]
for line in F:
    if line.contains(any number in f):
        delete the line in F
</code></pre>
