0
Input a four digit no. & Swap the first & last digit of no. And second & third digit will remain same
this is not a loop question
3 Answers
+ 8
Hello Ayush Verma please be more specific if you have a question about this otherwise it appears to be an assignment which are no longer allowed in Q&A.
+ 2
a = input()
# make sure user inputs 4 digit no
a[0], a[-1] = a[-1], a[0]
# no matter what length, it'll swap 1st and last digits
0
Then, whats your problem?