Computer Science, asked by salmanh37, 11 months ago

remove all the lines that contain the character a' in a file and write it to another file

Answers

Answered by arnavkavya2512
0

Answer:

a

Explanation:

fe So. th Raynhsangyou

Answered by amuthamcablevkl
0

Answer:

infile = file('./oldfile.txt')

newopen = open('./newfile.txt', 'w')

for line in infile :

   if 'a' in line:

       line = line.replace('.' , '')

   else:

       newopen.write(line)

file.close()

Explanation:

plz mark me as brainest

Similar questions