Last answered:

18 Apr 2022

Posted on:

16 Apr 2022

0

Question 3: Error when dict function applied on zip object

Hello there,

In Question 3, when I run the following chunk of code, it gives me an error saying  "TypeError: 'Counter' object is not callable"; any help is appreciated.

for i in range(len(companies)):
                d_1[companies[i]] = dict(zip(key_names,prices[i]))



Thank you.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

18 Apr 2022

0

Hey,

Thank you for your question!

For me, the code runs without any errors. What I suggest is to either comment the rest of the code in the document, or create a new document and solve Question 3 there. The error might be coming from the solution of another problem.

Kind regards,
365 Hristina

Submit an answer