python怎么调用其他函数里的其中一个返回值?
deffilter():miniMortgages=[]standardMortgages=[]jumboMortgages=[]foriinmortgage(mortg...
def filter():
miniMortgages=[]
standardMortgages=[]
jumboMortgages=[]
for i in mortgage(mortgages):
if i<200000:
miniMortgages.append(i)
elif i>=200000 and i<=467000:
standardMortgages.append(i)
else:
jumboMortgages.append(i)
return miniMortgages,standardMortgages,jumboMortgages
上面的代码返回了三个列表,然后我下面想要分别取这三个列表 如何取。。。
for i in miniMortgages:
if i>2000000:
print('not all miniMortgages are below 200000')
else:
print('all of the miniMortgages are below 200000') 展开
miniMortgages=[]
standardMortgages=[]
jumboMortgages=[]
for i in mortgage(mortgages):
if i<200000:
miniMortgages.append(i)
elif i>=200000 and i<=467000:
standardMortgages.append(i)
else:
jumboMortgages.append(i)
return miniMortgages,standardMortgages,jumboMortgages
上面的代码返回了三个列表,然后我下面想要分别取这三个列表 如何取。。。
for i in miniMortgages:
if i>2000000:
print('not all miniMortgages are below 200000')
else:
print('all of the miniMortgages are below 200000') 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询