Last answered:

11 Dec 2023

Posted on:

04 Dec 2023

0

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)
Posted on:

10 Dec 2023

0

I also found this isue in the solution

Instructor
Posted on:

11 Dec 2023

0

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

Submit an answer