Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add a string to each element of a list python

my_list = ['foo', 'fob', 'faz', 'funk']
string = 'bar'
list2 = list(map(lambda orig_string: orig_string + string, my_list))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #string #element #list #python
ADD COMMENT
Topic
Name
2+8 =