this is what I wish for...
INPUT [1,2,3,4,5]
OUTPUT 12345
I've tried this but it didn't work...
l1 = [1,2,3,4,5,6]
print([int(n1) for n1 in str(l1).split() if n1.isdigit()])
this is what I wish for...
INPUT [1,2,3,4,5]
OUTPUT 12345
I've tried this but it didn't work...
l1 = [1,2,3,4,5,6]
print([int(n1) for n1 in str(l1).split() if n1.isdigit()])
If you want the result to be an integer, the following should do the trick:
int(''.join([str(i) for i in l1]))
If you still want it as a string then simply do
''.join([str(i) for i in l1])