pyton como identificar se é numero
def is_simple_number(value):
if not value.strip().replace('-', '').replace('+', '').replace('.', '').isdigit():
return False
try:
float(value)
except ValueError:
return False
return True
3.67
3
case = input(escolha um valor de 0 a 10)
if type(case) != int:
print("Digite apenas numeros!")
else:
#--processo
Thank you!
3
0
Are there any code examples left?
New code examples in category Python