+ 2
How this is working ?
a = [3,2,0,1 ] b = [1,0,3,2 ] b.sort(key = lambda x: a[x]) print(b) I couldn't understand how line 3 is working and from where x is getting value
1 Odpowiedź
a = [3,2,0,1 ] b = [1,0,3,2 ] b.sort(key = lambda x: a[x]) print(b) I couldn't understand how line 3 is working and from where x is getting value