My data, that I've extracted from a webpage looks like below after using print statement.
[[u'Neoplasms', u'Medical Subject Headings', u'direct', u'cancer', u'Neoplasms', u'Medical Subject Headings', u'Malignant Neoplasm', u'National Cancer Institute Thesaurus', u'direct', u'cancer', u'Malignant Neoplasm', u'National Cancer Institute Thesaurus']]
I'd like to write it to a csv file like this, with each row containing six elements.
Neoplasms, Medical Subject Headings, direct, cancer, Neoplasms, Medical Subject Headings
Malignant Neoplasm, National Cancer Institute Thesaurus, direct, cancer, Malignant Neoplasm, National Cancer Institute Thesaurus
Please suggest me how I can go about doing that.
解决方案
In python 2.7 you can do as follows: