Here's how to punctuate the given sentence in Python:
main.py323 chars6 lines
Output:
main.py52 chars2 lines
In the code above, we first capitalize the first letter of the sentence using capitalize()
function of Python strings. Then, we append a question mark at the end of the sentence using string concatenation and slicing. Finally, we replace the word "didnt" with "didn't" and the word "zoo" with "Zoo" using the replace()
function.
gistlibby LogSnag