f = file.readlines()
l = 0
while l <= len(f):
for i in range(l):
x = f[i]
l += 1
for a in x:
if a == "a":
f.pop(i)
break
else:
continue
print(f)
file.close()
I want to pop any line from the data which has any character 'a' in it.