Every line of 'python isdigit' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
338 def isdigit(self): return self.data.isdigit()
120 def is_digit(thing): 121 """ checks if an object is a digit 122 123 >>> is_digit(1) 124 True 125 >>> is_digit("1") 126 True 127 >>> is_digit("a") 128 False 129 >>> is_digit([]) 130 False 131 """ 132 return str(thing).isdigit()