First of all, write a script for what you want in English. Then it becomes like this.
prepare a blank text, as New Text.
open "test.txt", as Original Text.
for every line in Original Text :
If "hello" is in the line:
replace every "hello" in the line with "hello".
add the line to New Text.
save New Text as a file.
the end.
Now let's read Python Basic Course. Yes, that's right. You can do it yourself.
© 2024 OneMinuteCode. All rights reserved.