I have a program that registers first and last name and I have a filter so that characters that are not letters are not allowed, but the space, since it is not a letter, does not support it and I can not put the last name.
Does anyone know how I can admit spaces?
I have seen the S.isspace()
statement, but I do not see any utility since it only returns True
if the whole string has spaces.
Code:
nmyap1 = (input("MESA 1: Ingresa nombre y apellido de 1era persona: "))
while (len(nmyap1)>20) or (not (nmyap1.isalpha())):
nmyap1 = (input("Demasiados car. (max 20) o car. invalido, ingrese otra vez: "))