Your question is Case Conversion Coding Task. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Exusia's text-processing utilities need to emphasize the boundaries of every word in a line. Given a string, capitalize the first and last ASCII alphabetic character of each whitespace-delimited token, while preserving all other characters, capitalization, punctuation, and whitespace.
A token may contain punctuation or digits. For example, in (hello),, the letters h and o are the word edges. Tokens containing no alphabetic characters remain unchanged. If a token contains one alphabetic character, capitalize it once.
Implement capitalize_word_edges(line), where line is a string. Return a new string with the required capitalization. Do not modify the order or number of characters.
def capitalize_word_edges(line):