Ram
0
Q:

is number python

var.isdigit()
#return true if all the chars in the string are numbers
#return false if not all the chars in the string are numbers
2
if type(variable) == int or type(variable) == float:
    isNumber = True
2
txt = "565543"

x = txt.isnumeric()

print(x) 
# Output True if String is all numbers
0

New to Communities?

Join the community