0

I have a list of strings with spaces, periods, commas and semi colons and I'm wondering how do I get these into a csv file? I need each list of strings to correspond to one line.

1
  • 1
    You will need to be more specific. What format do you have, and how do you want it mapped to CSV? Give examples. Commented Aug 26, 2011 at 15:38

2 Answers 2

2
with open('my.csv', 'w') as handle:
    handle.write('\n'.join(list_of_strings))

? We need more info on your "list of strings" to know if you need to do any more than that.

Sign up to request clarification or add additional context in comments.

Comments

2

Did you have a look to the csv module (especially the examples part )?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.