What does "key=lambda x : x [ 1 ] " actually do?
Lambda Functions
It makes a function named key which can take a list as an argument and returns the value present at the index 1 of that list. Eg-
x=[1,2,3,4,5,6]
key=lambda x : x[1]
print(key(x))
In the above example we pass x to the function named key and it returns us the value “2” which is present at index 1 of the lit x.