Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python build a string using reduce and concatenate

data = ['alfa', 'bravo', 'charlie', 'delta']
print(ft.reduce(lambda x, y: x + ("." if x else "") + y[0], data, ""))
# a.b.c.d
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #build #string #reduce #concatenate
ADD COMMENT
Topic
Name
5+9 =