Your question is Word Transformation Rules. 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.
Circle payment operations receive a comma-separated list of labels that must be normalized before being displayed. Given a string of non-empty words separated by a comma and optional spaces, transform each word according to its length:
", " as the separator.Implement transform_words(text), which accepts a string text and returns a string. Words contain alphabetic characters only. The input contains one or more words separated by commas, and each comma may be followed by zero or more spaces. The output must contain the same number of words, separated by exactly one comma and one space.
def transform_words(text):