Can someone please explain to me how is max() function working in the following code?
strings = ['enyky', 'benyky', 'yely','varennyky']
print(max(strings))
max() function should return the longest string in following list, that is 'varennyky', instead I am getting 'yely' as output.
Can someone please explain me?