Q3: the for loop should iterate with range up to len(companies) instead of len(key_names)
Hi,
In Q3: the for loop should iterate with range up to len(companies)
instead of len(key_names)
, as we go through each companies.
It worked because in this case the lists key_names
and companies
have the same amount of elements, but if there was one more company for example, this one wouldn't be treated.
So we should have:
...
for i in range(len(companies)):
...
2 answers ( 0 marked as helpful)
I also found this isue in the solution
Hey Benjoun and Ren,
Thank you for reaching out and for your observation. Indeed, in general, it would be better to loop through the company rather than the key names.
Kind regards,
365 Hristina