163836/how-can-i-capitalize-the-first-letter-of-each-word-in-a-string
s = 'the white pigeon'
...do something here...
s should be:
'The White Pigeon'
What's the easiest way to do this?
The .title() method of a string (either ASCII or Unicode) does this:
>>> "hello world".title() 'Hello World' >>> u"hello world".title() u'Hello World'
Do take care to look out for strings with embedded apostrophes,
By using the .title() method of string ...READ MORE
class Solution: def firstAlphabet(self, s): self.s=s k='' k=k+s[0] for i in range(len(s)): if ...READ MORE
There are several options. Here is a ...READ MORE
n=[1,2,3,4,5,6,7,8,9] print(len(n)) =9 READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
The len() function can be used with several different ...READ MORE
So you want (element 0 + element ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.