I have a list with of digits in this order : units, tents, cents, etc. I want to return the number forme by its digits. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I have a list with of digits in this order : units, tents, cents, etc. I want to return the number forme by its digits.

Ex: the digits are write from keyboard l=[4, 3,8,9,2]------>nr=29834

30th Dec 2019, 11:41 AM
Frontend Dev Junior
Frontend Dev Junior - avatar
5 Answers
+ 5
lst1 = [2, 4, 0, 2, 5, 4] lst2 = [] [lst2.insert(0,i) for i in lst1] print(lst2)
30th Dec 2019, 1:25 PM
Lothar
Lothar - avatar
+ 2
I don't understand how you got that output. Also, don't forget go include the programming language you're using in the tags
30th Dec 2019, 12:11 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
I didnt write well 'tents' perhaps is 'tens'. But I hope the example is better.
30th Dec 2019, 11:43 AM
Frontend Dev Junior
Frontend Dev Junior - avatar
0
Thanks. I made it.
30th Dec 2019, 1:24 PM
Frontend Dev Junior
Frontend Dev Junior - avatar