>>> b = "my name"
>>> b.capitalize()
'My name'
>>> b.title()
'My Name'
More Related Contents:
- Pythonic way to create a long multi-line string
- How to get the value of a variable given its name in a string? [duplicate]
- About the changing id of an immutable string
- String replace doesn’t appear to be working
- How to delete a character from a string using Python
- Remove all special characters, punctuation and spaces from string
- Check if a word is in a string in Python
- Add Leading Zeros to Strings in Pandas Dataframe
- Python str vs unicode types
- Standard way to embed version into Python package?
- python: SyntaxError: EOL while scanning string literal
- n-grams in python, four, five, six grams?
- How do I remove leading whitespace in Python?
- Finding a substring within a list in Python [duplicate]
- Python Replace \\ with \ [duplicate]
- Best way to parse a URL query string
- Finding subsequence (nonconsecutive)
- removing newlines from messy strings in pandas dataframe cells?
- String exact match
- How to strip a specific word from a string?
- How to detect lowercase letters in Python?
- Python- how do I use re to match a whole string [duplicate]
- How to apply __str__ function when printing a list of objects in Python [duplicate]
- Plural String Formatting
- Search for string allowing for one mismatch in any location of the string
- Setting the fmt option in numpy.savetxt
- Adding backslashes without escaping [duplicate]
- Validating user input strings in Python
- What does backward-slash b do in Python?
- How to pad a string to a fixed length with spaces [duplicate]