Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def last_digit(x):
- return x % 10
- if __name__ == "__main__":
- x = int(input("x="))
- print("last digit of %d is %d" % (x, last_digit(x)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement