char=input('enter character:')
if '0'<=char<='9':
print(char,'is digit')
else:
print(char,'is not digit')
(OR)
char=input('enter character:')
if 48<=ord(char)<=57:
print(char,'is digit')
else:
print(char,'is not digit')
(OR)
char=input('enter character:')
if char.isdigit(): # isdigit() is a method to find digit or not it returns true and false
print(char,'is digit')
else:
print(char,'is not digit')