Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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)
Comment

PREVIOUS NEXT
Code Example
Python :: beautiful soup 4 python 
Python :: python except show error 
Python :: close turtle window python 
Python :: python fdr correction 
Python :: upgrade python to 3.8 
Python :: find index of null values pandas 
Python :: custom 404 page flask 
Python :: how to change font sizetkniter 
Python :: generate random characters in python 
Python :: brownie get active network 
Python :: how to clear the console python 
Python :: how to make a query for not none value in django 
Python :: python map input 
Python :: how to know if python is 64 or 32 bit 
Python :: how to create a object in djago views model 
Python :: normalize column pandas 
Python :: python program to print list vertically without using loop 
Python :: django prepopulated_fields 
Python :: py check discord token 
Python :: split list into list of lists python on every n element 
Python :: install qt python 
Python :: check iterable python 
Python :: find out current datetime in python 
Python :: numpy replicate array 
Python :: python - subset specific columns name in a dataframe 
Python :: How to set "Unnamed: 0" column as the index in a DataFrame 
Python :: binary to text python 
Python :: detect stop codon 
Python :: how to increase and decrease volume of speakers using python 
Python :: python program to convert tuple into string 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =