stock=["AAPL","ADSK","AKAM","AMZN","CSCO","EA","INTU","NFLX","NVDA","QCOM", "MSFT","IBM"]
for stocks in stock:
test(stocks)
我希望每个股票在每次运行中调用一次函数,但是所有股票都作为参数传递,并且所有股票的结果都会出现。 我甚至试过
for stocks in stock:
test()
相同的结果。是否可以以这种方式调用函数,它为每个股票运行一次,然后迭代。