
Complete the following Python function: ```python def total...
Prompt
Complete the following Python function: ```python def total_match(lst1, lst2): ''' Write a function that accepts two lists of strings and returns the list that has total number of chars in the all strings of the list less than the other list. if the two lists have the same number of chars, return the first list. Examples total_match([], []) β [] total_match(['hi', 'admin'], ['hI', 'Hi']) β ['hI', 'Hi'] total_match(['hi', 'admin'], ['hi', 'hi', 'admin', 'project']) β ['hi', 'admin'] total_match(['hi', 'admin'], ['hI', 'hi', 'hi']) β ['hI', 'hi', 'hi'] total_match(['4'], ['1', '2', '3', '4', '5']) β ['4'] ''' ```
Answer guidance
Canonical solution (function body): l1 = 0 for st in lst1: l1 += len(st) l2 = 0 for st in lst2: l2 += len(st) if l1 <= l2: return lst1 else: return lst2