So far I'm able to capitalize the first word of the sentence, but I need every first letter after a period to be capitalized. This is what I have:
def main():
input1 = input('Enter your input here: ')
capitalize = str.capitalize(input1)
print("The capitalized version:", capitalize)
main()
Use Sentence Case of the rename package.
>>> from tl.rename.case import transform_sentence_case
>>> transform_sentence_case(['foo bar baz', 'FOO bar. baz Asdf'])
['Foo bar baz', 'Foo bar. Baz asdf']
Or you could use a regex...
\.\s*([a-z])
Captialise the $1 capturing group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With