Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite3 Réponses
+ 7
Make it a string,reverse the string,make it to integer
0
You can also combine %10 and //10 (integer division) if you want to avoid string conversion. But it is a bit more complicated.
0
As per Frogged suggestion
num = 42
print(int(str(num)[::-1])*2)