I have a list of objects. Each object have different attributes.
One of which is a list
I would like to export this objects to a csv file that looks like
final_list = 
for a in list:
first_value = a.first_value
list2 = 
for b in a.list:
with open('file' ) as f:
writer = csv.writer(f)
if you do that:
you create a row with a value and a list.
csv module performs a
str conversion when writing, which explains you see the string as it is printed when you debug in python.
final_list.append(a.first_value) # string final_list.append(",".join(a.list)) # composes a coma separated string with the contents of a.list
(quotes protecting the commas so it is seen as a single cell)