data = ['str', 'frt']
max(data, key=len)
The max function returns only one of the strings.
How can I make it return both of the strings?
The length of both strings is equal, so max
should return both the strings but it returns only one so is there a way to return all max items?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…