How does this works? verts = [[float(i) for i in r[:3]] for r in rows]
Use the excellent csv module built into Python for that. The Python documentation has plenty of examples on how to read and write CSV files.

Once you have a row, you can convert individual bits to other objects, like so:

vec = mathutils.Vector([float(coord) for coord in row[1:4]])


The explicit conversion to float is necessary as CSV is untyped, so every field is returned as string.

The [f(x) for x in collection] construct is called a list comprehension, and is also explained in the Python documentation.