ReplaceText

PYTHON

write a program that replaces text in a file. Your program should prompt the user to enter a filename, and old string, and a new string. Here is a sample run..

Enter a filename: text.txt (enter)

Enter the old string to be replaced: morning (enter)

Enter the new string to replace the old string: afternoon (enter)

Done

 
Powered by