I'm writing a program that looks through CSVs in a directory and appends the contents of each CSV to a list. Here's a snippet of the offending code:
import glob
import re
c = glob.glob("*.csv")
print c
archive = []
for element in c:
look = open(element, "r").read()
open = re.split("\n+", look)
for n in open:
n = re.split(",", n)[0]
archive.append(n)
However, when I run this script, I get a TypeError: 'list' object is not callable. Can somebody please explain what's going on?