I want to count the line only when special characters are present in the line.
count=0
with open (xvg_input, 'r') as cavity_count:
line_to_end = cavity_count.readlines()
for line in line_to_end:
if "#" in line and "@" in line:
count +=1
print (count)
Just want to count the lines when there is a special character.