Write a program in which Remove …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Posted by Vivek Vaish 4 years, 4 months ago
- 2 answers
Gaurav Seth 4 years, 4 months ago
Answer:infile = file('./oldfile.txt')
newopen = open('./newfile.txt', 'w')
for line in infile :
if 'bad' in line:
line = line.replace('.' , '')
if 'naughty' in line:
line = line.replace('.', '')
else:
Related Questions
Posted by Syedali Fathima 5 months, 3 weeks ago
- 1 answers
Posted by Hanni Pham 4 months, 1 week ago
- 1 answers
Posted by Prawar Narang 6 months, 2 weeks ago
- 1 answers
Posted by Hanni Pham 4 months, 1 week ago
- 0 answers
Posted by Priya Shukla 5 months, 2 weeks ago
- 1 answers
Posted by Manoj Kumar Manoj Kumar 7 months, 2 weeks ago
- 0 answers
Posted by Kandeepan Jothivel 6 months, 3 weeks ago
- 2 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Vivek Vaish 4 years, 4 months ago
1Thank You