num = int(input("Enter a 3-digit number: "))
first = num//100
second = (num - (first*100)) //10
third = (num - ((first * 100) + (second *10)))
new_num = second*100 + third*10 + first
print(new_num)
I hope this helps!
5.1m questions
6.7m answers