1
for i in view_overall_isp_ratings:
#the int and the round is just for casting the values returned
me = (int(round(i.avg_of_ratings)))
print(me)
and this prints intergers like this 1
1
1
1
4
for循环蟒蛇我想要什么
for it to produce a list like this
[ 1 ,1 ,1 ,1 ,4]
试图用[],但至少玩弄的列表我可以得到是
[1]
[1]
[1]
[1]
[4]
任何人都可以协助
你已经拯救了一个灵魂,这绝对有效,我想我现在需要拥抱更pythonic的思维方式.... – Chamambom