我正在尝试修复以下错误:
Python 3:ValueError:min()arg是一个空序列
def get_min(cur_price,price_list):
min_cost = []
for j in price_list:
if cur_price > j:
min_cost.append(cur_price - j)
return min(list(min_cost))
# Complete the minimumLoss function below.
def minimumLoss(price):
min_costs = list(range(0))
for i in range(len(price)):
min_costs.append(get_min(price[i], price[i:]))
return min(min_costs)