[b for _, b in sorted(enumerate(arr, 1), key=lambda x: int.__mul__(*x))]
is a list comprehension in Python meant to sort an array in ascending order while using the value at each place multipled by a 1-based index
So [4, 3, 1] would be sorted based on [4*1, 3*2, 1*3] giving [1, 4, 3].
I am trying to understand: 1. How the _ in the code works 2. How the *x multiplies the value with its index (Since the enumerate has 1 as a parameter, I am assuming that is how the 1-based indexing is taken care of).