I have a list, in which is another list and I want to doc.write(a)
doc.write(a)
a = [[1, 2, \"hello\"], [3, 5, \"hi There\"], [5,7,\"I don\'t know\"]]
List comprehension would be the best choice:
>>> ''.join([str(item) for sublist in a for item in sublist]) "12hello35hi There57I don't know"
It's the most recommended approach in a similar SO question, considering performance and syntax.