Program - add a string to each element of a list python


Topic: Program - add a string to each element of a list python

Solution

my_list = ['foo', 'fob', 'faz', 'funk']
string = 'bar'
list2 = list(map(lambda orig_string: orig_string + string, my_list))



List all Python Programs