N=int(input("Enter the number: ")) N=N-((N//10)*10) print(N) This code is only valid for 3 digits. I want a code for any number with any number of digits. Continue reading...