On Tue, May 28, 2013, at 02:25 PM, Matt Graves wrote: > I receive this error while toying around with Functions... > > def pulldata(speclist,speccolumn): > with open('profiles.csv', 'r') as f: > reader = csv.reader(f) > for column in reader: > (speclist).append(column[('speccolumn')]) > > pulldata(speclist = 'numbers', speccolumn = "0") > > > >Traceback (most recent call last): > > File "C:\Desktop\Python\CFI\Devices V2\users.py", line 17, in <module> > > pulldata(speclist = 'numbers', speccolumn = "0") > > File "C:\Desktop\Python\CFI\Devices V2\users.py", line 16, in pulldata > > (speclist).append(column[('speccolumn')]) > >AttributeError: 'str' object has no attribute 'append' > > I'm getting the error because it should say "numbers.append", but it is > reading it as "(speclist).append".
Because it indeed says "(speclist).append"... am I missing something? -- http://mail.python.org/mailman/listinfo/python-list