I did this using the first method mentioned in the exercise i.e. using "for item in words:" But when I tried with the second method i.e. "for item in range(len(words)):". It does not work.
I thought you can't modify list elements using the first method but you can using the second method. This exercise proved otherwise.
n = ["Michael", "Lieberman"] # Add your function here def join_strings(words): result = "" for index in range(len(words)): result = result + result[index] return result print join_strings(n)