0
Coding question
Name = input('Enter name:') Surname = input('Enter surname:') Title = input("Enter title:") print('Person is:{0:.4s}. {1:s} {2:.1s}.'.format(Title,Surname,Name)) This should appear like this Person is: Prof.Dogrmaci, I. But the last initial in it is not appearing, what’s the reason ?
3 Respuestas
+ 1
print('Person is:{0:.4s}. {1:}, {2:.1s}.'.format(Title,Surname,Name))
0
thank you it worked! what was my mistake?
0
I edited to {1:s} to {1:}.
But actually yours also working.. Check again..
May you actually adding like 1:.s..?
{1:} output total surname..