سلام وقت بخیر
میشه لطفا کدمو بررسی کنید ببینید به چه علت تایپ اررور میده؟
from data import teams
def parse_result(team):
win = 0
draw = 0
lose = 0
for i in team['result']:
if i == 'w':
win += 1
elif i == 'd':
draw += 1
elif i == 'l':
lose += 1
return {
'name': team['name'].ljust(18),
'win': win,
'draw': draw,
'lose': lose,
'Goal+': team['Goal+'],
'Goal-': team['Goal-']
}
for team in teams:
parse_result(teams)