Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
A little trick is that Python treats boolean as 0/1 when it think so ... solution in Clear category for Correct Sentence by ArchTauruS
"""Job to do...
1, make the first character uppercased.
2, make sure the sentence ends with a dot.
A little trick is that Python treats boolean as 0/1 when it think so ...
"""
def correct_sentence(text):
return text[0].upper() + text[1:] + '.' * (not text.endswith('.'))
Nov. 8, 2018
Comments: