Created
April 4, 2017 19:28
-
-
Save gileno/2618f4d879c9f913e618fabcfe197a3d to your computer and use it in GitHub Desktop.
Lista de Contatos
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
numero = input("Quantos contatos quer cadastrar? ") | |
numero = int(numero) | |
contador = 0 | |
emails = [] | |
nomes = [] | |
telefones = [] | |
while contador < numero: | |
nome = input("Nome: ") | |
nomes.append(nome) | |
telefone = input("Telefone: ") | |
telefones.append(telefone) | |
email = input("E-mail: ") | |
emails.append(email) | |
contador = contador + 1 | |
arquivo = open("contatos.csv", "w") | |
for i in range(numero): | |
emails[i] | |
nomes[i] | |
telefones[i] | |
arquivo.close() | |
print("Fim do programa") | |
## | |
## escrita | |
##arquivo = open("teste.txt", "w") | |
##arquivo.write("oi turma!\nOi de novo") | |
##arquivo.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment