Say I have a list in python, like such:
list=[1,2,3,4,5]
How would I merge the list so that it becomes:
list= [12345]
If anyone has a way to do this, it would be greatly appreciated!!
reduce(lambda x,y:10*x+y, [1,2,3,4,5])
# returns 12345
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With