I want to add a specific value after every two elements in List. Ex:
zz = ['a','b','c','d','f']
i want to add the word: "Hero" and the final look will be :
zz = ['a','b','Hero','c','d','Hero','f']
i tried to use function insert to put an value in a specific index but it doesnt work this is my code:
zz = ['a','b','c','d','f']
count = 0
for x in zz:
if count == 2:
zz.insert(count,"Carlos")
print(x)
count+=1
i think it is far away from the solution im still newbie in python