How to replace every second occurence of a word in a text file
问题 In a file called sample.txt , I have the following text: Once there is a tortoise and a rabbit. The rabbit was fast, tortoise was slow. Rabbit used to mock the tortoise. Once the rabbit challenged the tortoise for a race. Tortoise accepted rabbit’s request. Rabbit was overconfident. Rabbit thought to win the race. Rabbit ran fast. Then rabbit got tired. Rabbit wanted to take rest. So rabbit slept under the tree. Tortoise kept going and won the race. How to replace every second occurrence of