how to find the lowest value in a nested list python

if __name__ == '__main__':
arr = []
for _ in range(int(input())):
    name = input()
    score = float(input())
    arr1 = [name, score]
    arr.append(arr1)
arr.sort(key=lambda x: x[1])
# print(arr)
# print(min(arr,key=lambda x:x[1]))
arr.remove(min(arr,key=lambda x:x[1]))
# print(arr)
minimum = min(arr,key=lambda x:x[1])
# print(minimum[1])
a=[]
minimum = minimum[1]
for i  in arr:
    if(i[1] == minimum):
        a.append(i[0])
a.sort()
for i in a:
    print(i)

Here is what the above code is Doing:
1. It is taking the input and storing it in a list.
2. Then it is sorting the list according to the second element of the list.
3. Then it is removing the minimum element from the list.
4. Then it is finding the minimum element from the list.
5. Then it is storing the names of the students who have the minimum score in a list.
6. Then it is sorting the list of names.
7. Then it is printing the names.