0
Program that receives a name via keyboard and must print the last name, first name and other abbreviated names ex.: receives "Luis Costa Santos" and returns "Santos, Luis C."
lista = []
nome = ''
answer = ''
i = 0
while answer != 'n':
nome = str(input('ponha o seu nome: '))
lista.append(nome)
answer = str(input('deseja continuar? s ou n: '))
if answer == 's':
i += 1
else:
break
print(lista)
Doubt: why are you reading multiple names? The statement asks to read only one, so this loop of repetition made no sense.
– Woss
Homer, what would the name "So-and-So" look like? I’d stay
Silva, Fulano d.
orSilva, Fulano D.
orSilva, Fulano
??– fernandosavio
The first option Silva, Fulano D.
– Homero