- isdigit() is a python in-build function which check the string contain only digits or not.
- if string contain only numbers then it will return True otherwise it will return False.
Example
string is "123"
it will return True
string is "mytext123"
it will return False
program-
s="my132"
print(s.isdigit())
s="132"
print(s.isdigit())
s="132my"
print(s.isdigit())
s="123445566"
print(s.isdigit())
False
True
False
True