Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # teste.py
- #
- # Copyright 2016 Reni <Reni@RENI-PC>
- my_list_with_names = ["Alan", "Vini", "Reni"]
- def list_use():
- nome = raw_input("Digite o seu nome para incluir-lo na lista: ")
- if(len(nome) <= 0):
- print("Você não digitou nada demais!")
- else:
- print("\nSeu nome: %s" % (nome))
- my_list_with_names.append(nome)
- for indice in my_list_with_names:
- if(indice == nome):
- print("Nome incluido: %s\n" % (indice))
- else:
- print("\nNome: %s\n" % (indice))
- list_use()
Advertisement
Add Comment
Please, Sign In to add comment