60 478
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #3390 in Python for mukunda

Question #3390
Copy the following text into a text file and save it as “IT.txt”

“Information technology (IT) is "the study, design, development, application, implementation, support or management of computer-based information systems, particularly software applications and computer hardware", according to the Information Technology Association of America (ITAA).[1] IT deals with the use of electronic computers and computer software to securely convert, store, protect, process, transmit, input, output, and retrieve information.“

Replace the word “of” with “WORLD” in the above text file in all occurrences.
Expert's answer
import re

fin = open ("IT.txt")
s = fin.read()
s = re.sub (" of ", " WORLD ", s)

fin.close()
fout = open ("IT.txt", "w")
fout.write(s)
fout.close()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions