1
I have 2 inputs that receive the first and last name of a person, then is informed the values typed and is asked the age of the same, but the print is showing the name information between "Square brackets". How can I remove?
That’s the way out
Type your first name: Elvis
Type your last name: da silva
['Elvis'] ['Da', 'Silva'], Type your age: 18
That is the code
first_name = str(input('Type your first name: ').split())
last_name = str(input('Type your last name: ').split())
age = int(input('{}, Type your age: '.format(str(first_name+" "+str(last_name)).title())))
I believe you were willing to use the method
.strip()
to remove spaces before and after the string and ended up getting confused.– Giovanni Nunes