Created
February 20, 2015 19:27
-
-
Save diegorocha/41d446521dacff7a8c72 to your computer and use it in GitHub Desktop.
Exemplo simples de escrita de itens de uma lista em um arquivo csv com Python. (Resultado de uma dúvida da lista PythonBrasil)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
my_list = ["Matrix", "Blade Runner", "GodFather"] | |
new_csv = csv.writer(open("my_csv.csv", "wb")) | |
new_csv.writerow(["Nome do Filme"]) | |
for row in my_list: | |
new_csv.writerow([row]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment