How to identify the element with the smallest number of characters in a Python list?
a = ['apple', 'beer', 'compsci']
print(min(a))
apple
As the title suggests, I want to print'beer', which is the minimum number of characters in the list, not the minimum number of letters. What should I do?