Right now am planning to add items into the database. The item name, price and all are all entered by the users. How do I find if theres any alphabets when entering the price? i tried using .isnumber() but it seems to be reading my decimal point as a character as well.
while True:
itemPrice = input("Please Enter Item Price: ")
if str(itemPrice).isnumeric() == False:
print("Please enter a value!")
else:
print(itemPrice)
break
For example, they allow if i enter 5 but not 5.5 and since this is item price it should have decimals.