text = """<span class="latitude">55.0415</span>"""
tmp_str = ""
s = 0
while s <= len(text) - 1:
if text[s].isdigit():
tmp_str = tmp_str + text[s]
s += 1
elif text[s] == ".":
if text[s-1].isdigit() and text[s+1].isdigit():
tmp_str = tmp_str + text[s]
s += 1
else:
s += 1
float_number = float(tmp_str)
print(float_number)