I have written a code that returns a phrase depending on the length of a name. Problem is, I can't submit it unless i fix this tiny error.
Here's what I've written:
name = input('Enter your name: ')
if len(name) <= 3:
print ('Hi',name,', you have a short name.')
elif len(name) > 8:
print ('Hi',name,', you have a long name.')
elif len(name) >= 4:
print ('Hi',name,', nice to meet you.')
For example: When i type in a 3 letter name such as 'Lin' it reruns the following
"Hi Lin*(space)*, you have a short name."
I wish to get rid of the (space) and have it return:
"Hi Lin, you have a short name."
I think the error lies with my concatenation and it automatically ads a space after the comma.