TypeError: 'list' object is not callable ---- ERROR

I am trying to print the fist 5 rows of the data with the below mentioned code
“”"
opened_file = open(‘AppleStore.csv’)

from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
print(apps_data[1:5])
“”""
But getting the Error:
TypeErrorTraceback (most recent call last)
in ()
4 read_file = reader(opened_file)
5 apps_data = list(read_file)
----> 6 print(apps_data[1:5])

TypeError: ‘list’ object is not callable

Please consult some of the other 30+ similar questions to find an answer and increase understanding.

If you just want a fix, including del list at the top of your code should fix it.

2 Likes