top of page
Search

# Python program to find minimum value in List

Program:

list=[(1,15,11), (4,7,1), (7,11,2),(10,10,18)]

print("The list is: " +str(list))

res1=min(list)[0]

res2=min(list)[1]

res3=min(list)[2]

print("The min of index 1: " +str(res1))

print("The min of index 2: " +str(res2))

print("The min of index 3: " +str(res3))

Output:

The list is: [(1, 15, 11), (4, 7, 1), (7, 11, 2), (10, 10, 18)]

The min of index 1: 1

The min of index 2: 15

The min of index 3: 11

44 views0 comments

## Recent Posts

See All

Write a Python function to calculate the factorial of a number (a non-negative integer). The function accepts the number as an argument. This program is most for O Level Practical Exam so read it care

This program is most for O Level practical Exam so read it carefully. Write a Python program that accepts a hyphen-separated sequence of words as input and prints the words in a hyphen-separated seque

This program is most for O Level Practical Exam so read it carefully. Program: import numpy as np x = np.array([1,2,3,4,5,7,2,1,1,1,8,9,1]) print(x) print("most frequent value in the list:") print(np.

bottom of page