在'str'和'int'的实例之间不支持'>'

时间:2019-11-30 22:10:11

标签: python list

  

我遇到此错误TypeError:'str'和'int'的实例之间不支持'<'

  def pur_med():
    count = 0
    with open("medicine.txt","r") as file:
        data = file.read().split("\n")
        for row in data:
            roww = row.split()
            if row[8] > 0:
                count += 1
                print(" Name : %s \n Quantity : %s \n Minimum Quantity : %s \n To be purchased : %s \n Supplier ID : %s \n"%(roww[0],roww[4],roww[5],roww[8],roww[7]))
    if count == 0:
        print("No medicine to be purchased. \n")

0 个答案:

没有答案