1var.isdigit()
2#return true if all the chars in the string are numbers
3#return false if not all the chars in the string are numbers
1# checking for numeric characters
2>>>string = '123ayu456'
3>>>print(string.isnumeric())
4False
5
6>>>string = '123456'
7>>>print(string.isnumeric())
8True
9