# need an index-based loop in this case, so that we can use # index to replace a list element words = ['apple', 'banana', 'fig'] for k in range(len(words)): words[k] = words[k].capitalize() print(words)