I would like to know what exactly is wrong with this python code:
import urllib.request
page = urllib.request.urlopen("http://beans-r-us.appspot.com/prices-loyalty.html")
text = page.read().decode('utf8')
price = 99.99
while price > 4.74:
where = text.find('>$')
preçoinicial = where + 1
preçofinal = preçoinicial + 5
price = text[preçoinicial:preçofinal]
print("Buy")
The error message is as follows:
Traceback (most recent call last):
File "starbuzzpreçocafe.py", line 7, in <module>
while price > 4.74:
TypeError: unorderable types: str() > float()