how to get the longest string in a set python code example Example: how to find the longest string python max(a_list, key=len)