[Solved] Removing words from a string- Python 2.7


I think that is what you need:

s="Here Comes The Sun And I Say It Is Alright".split()

for i in range(2, len(s), 3):
    s[i] = s[i - 1]

print(' '.join(s)) # 'Here Comes Comes Sun And And Say It It Alright'

8

solved Removing words from a string- Python 2.7