Turn A List to a Float That Can Be Divided Turn A List to a Float That Can Be Divided tkinter tkinter

Turn A List to a Float That Can Be Divided


You need to convert the first element from the return value from xpath :

euro_exchange = tree.xpath('//div[@class="price"]/text()')euro_exchange = float(str(euro_exchange[0]))