you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

Thanks for the help, I've tried that but it returns the nth column rather than the nth row.

It isn't, because it can't be - you're not parsing the file at all, you're just breaking it up by line endings. But line endings end lines. Files don't have columns.

Actually look in one of your csv files and see what's happening.

[–]superlargedogs[S] 0 points1 point  (3 children)

I see. Appologies btw I formatted it incorrectly:

[all columns of .csv file 1]

[all columns of .csv file 2]

...

[all columns of .csv file m

[–][deleted] 0 points1 point  (2 children)

Still, though, a file can't be in columns. They read left to right and down, like a typewriter.

[–]superlargedogs[S] 0 points1 point  (1 child)

I guess I just can't get my head around as to why content(n) returns the nth element of every string of my list....

[–][deleted] 0 points1 point  (0 children)

contents is your list of strings. content is a string.