小编Hum*_*ity的帖子

Unorderable Type错误在Python中意味着什么?

from urllib.request import urlopen
page1 = urlopen("http://www.beans-r-us.biz/prices.html")
page2 = urlopen("http://www.beans-r-us.biz/prices-loyalty.html")
text1 = page1.read().decode("utf8")
text2 = page2.read().decode("utf8")
where = text2.find(">$")
start_of_price = where + 2
end_of_price = where + 6
price_loyal = text2[start_of_price:end_of_price]
price = text1[234:238]
password = 5501
p = input("Loyalty Customers Password? : ")
passkey = int(p)

if passkey == password:
    while price_loyal > 4.74:
        if price_loyal < 4.74:
            print("Here is the loyal customers price :) :")
            print(price_loyal)
        else:
            print( "Price is too high to make a profit, come …
Run Code Online (Sandbox Code Playgroud)

python python-3.x

7
推荐指数
1
解决办法
5万
查看次数

标签 统计

python ×1

python-3.x ×1