list_1 = ["john", "peter", "steve", "mike", "paul"]
list_2 = ["green", "red", "blue", "purple", "orange"]
list_3 = [["dog", "cat"], "rabbit", "dog", "", ["cat", "mouse", "elephant"]]
combined_list = list(map(list, zip(list_1, list_2, list_3)))
for items in combined_list:
if isinstance(items[-1], list): #Check if last element is list.
writer.writerow(items[:-1] + items[-1])
else:
writer.writerow(items)