I am new to Python and I am doing some test exercises, and I am having problems in one that I have invented.
I want to collect names, put them in a vector, and sort them. This had been done before with numbers, but without a while
(asking in advance how many numbers were going to be ordered to be able to use a for
).
I already tell you, it will be a bullshit, but I can not see the error:
nombres = []
print("Introduce nombres y los devolvere ordenados. Escribe stop cuando quieras acabar")
stop = "stop"
while (input() != stop):
nombres.append(input())
nombres.sort()
print(nombres)