+ 2
How we change the first letter of first name and first letter of last name in capital letter if input would be all in lower case
Example :raj mohan then output should be Raj Mohan,by inbuilt function
15 Respuestas
+ 2
Subhash Kumar
This works fine. But I think, the function needs a name.
instead of
def(s):
Something like this
def cap(s):
for examle
+ 3
name = "franz mueller"
print(name.title())
+ 2
def(s):
str1= s.split(' ')
return ' '.join(words.capitalize() for words in str1)
+ 1
Maybe this way
https://code.sololearn.com/c4yjj66OhVcl/?ref=app
+ 1
+ 1
Ohh yeah sry Thomas
+ 1
Is not a problem. Only a hint for other beginners
0
Or do you have the full name in only one variable?
0
Yeah i found it , there is a capitalize() method which changes first letter of word in uppercase if there is alphabet ,if it's numerical then it leave as it
0
Thomas , it is in one variable
0
Yeah i also posted the code ..we can use that for many words
0
That's good 👍 rodwynnejones
And this one works also for many words
0
Yup
0
Now its fine
0
Subhash Kumar
This works fine. But I think, the function needs a name.
instead of
def(s):
Something like this
def cap(s):
for examle