Created
October 15, 2016 18:20
-
-
Save lucasp90/45b455e1a4322445a4b948f314d3653f to your computer and use it in GitHub Desktop.
Ejemplo sencillo del uso de csv.writer
This file contains hidden or 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 | |
cuentas_twitter = [("@YouTube", 64341900, 17755), ("@KingJames", 33284155, 5096), ("@rushtheband", 224345100, 1329)] | |
with open('notas.csv', 'w') as arch_salida: | |
writer = csv.writer(arch_salida) | |
writer.writerow(['alias', 'seguidores', 'tweets']) | |
for cuenta in cuentas_twitter: | |
alias = cuenta[0] | |
seguidores = cuenta[1] | |
tweets = cuenta[2] | |
writer.writerow([alias, seguidores, tweets]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment