in python
Write a function named “sort_by_index” that takes a list/arrayof lists/arrays as a parameter where each of the values of input isa list containing 6 integer values. Sort the input based on thevalues of the fifth value in each list
Answer
def sort_by_index(stores): stores.sort(key=lambda x: x[4]) return stores