[Solved] How to iterate odd indexes and add them back to original list
[ad_1] you can use something like that: sentence = input().split() ans = [] for i in range(len(sentence)): if i%2: ans.append(sentence[i]+’…’) else: ans.append(sentence[i]) print(‘ ‘.join(ans)) [ad_2] solved How to iterate odd indexes and add them back to original list