0

How to reverse a number of length n,using python?????

18th Mar 2020, 5:27 PM
Shubhankar Bajpai
Shubhankar Bajpai - avatar
4 Antworten
+ 1
number = 1234 a = int(str(number)[::-1]) print(a) print(type(a))
18th Mar 2020, 9:33 PM
rodwynnejones
rodwynnejones - avatar
19th Mar 2020, 4:39 AM
J Santhosh Kumar
J Santhosh Kumar - avatar
0
?? What does this second line means
19th Mar 2020, 3:17 AM
Shubhankar Bajpai
Shubhankar Bajpai - avatar