Append String in a Loop in Python | Codeigo
codeigo.com › python › append-string-in-a-loopAppend String in a Loop in Python. If you have a list of strings and you want to concatenate them to create a single string made of these elements, you can use the For loop. list_of_strings = ['one', 'two', 'three'] my_string = '' for word in list_of_strings: my_string += str (word) print ("Final result:", my_string) With each pass of the loop, the next word is added to the end of the string.