Lists and Loops 10. Reading CSV files Intro to Python

Screen Link:

Your Code:’’'from csv import reader
opened_file = open(‘AppleStore.csv’)
read_file = reader(opened_file)
apps_data = list(read_file)


What I expected to happen: to display length of read_file

What actually happened: ```TypeErrorTraceback (most recent call last)
in ()
5 opened_file.close()
----> 7 print(len(apps_data))

TypeError: ‘int’ object is not callable’’’

Other details: I continue to get the above error. This code is the exact same as in the answer provided. I even copy and pasted the answer provided under “get help” and I get the same error.

Hi @amhackdpt2,

I copied and pasted the code you provided and it worked for me (so your code is correct).

I would suggest restoring your initial code. You can do this by pressing the circular arrows beside the submit button at the bottom of the screen (see image below). It will ask you if you want to restore initial code or keep your code, select restore initial code. Then re-enter your original code.


Let me know if that works or not.

Good Luck,

That did work this time around. Thanks for the help. I will try to remember to use the reset if I encounter a similar issue in the future.

1 Like