- for line in data[2:]: # skip the first two lines
- lines.append(line[1:-3]) # chop one char from the front and three from the end
+ for line in data:
+ if line[0] == "\"":
+ # the line is typically (but not always):
+ # [quote] <data> [quote][comma][newline]
+
+ # chop one char from the front
+ line = line[1:]
+
+ # now find the final quote and truncate there
+ quote = string.rfind(line, "\"")
+
+ # and append the remaining data to our list
+ lines.append(line[:quote])