I use this loop to extract integers, what changes should I make to this loop which will accept decimal numbers. Here inputn is a string:
def numberseeker():
global i, inputn, number, num
while i < len(inputn):
if inputn[i].isalnum() is True:
num = float(inputn[i])
if inputn[i] == 0:
number += num
else:
number = (number * 10) + num
i += 1
elif inputn[i].isalnum() is False:
ope = inputn[i]
operator(ope)
break