嘿伙计们试图完成我的程序。这是我的代码:
lists = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
#I want to make a new list consisting of only numbers above 50 from that list
if any(list > 50 for list in list):
newlists = list
我不知道怎么办。我做错了什么,有人可以帮助我吗?
请您参考如下方法:
嘿伙计们试图完成我的程序。这是我的代码:
lists = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
#I want to make a new list consisting of only numbers above 50 from that list
if any(list > 50 for list in list):
newlists = list
我不知道怎么办。我做错了什么,有人可以帮助我吗?
请您参考如下方法: