I have a list, example:
mylist=["a", "b", "end"]
I want to append all values of mylist to a different list (new_list) and also add the string " letter" to each value of the new_list except the last one (value: end)
So far I have a for loop that adds the string "letter" to all values:
new_list = []
for x in my_list:
new_list.append(x + " letter")
which produces:
("a letter", "b letter", "end letter")
I want:
("a letter", "b letter", "end")
'end'? Simply having the list terminate would arguably be much clearer.