Skip to content

Commit a28e26c

Browse files
12345radhatechyminati
authored andcommitted
Create Second_minimum.py
1 parent 5af4c25 commit a28e26c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎Second_minimum.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Python prog to illustrate the following in a list
2+
def find_len(list1):
3+
length = len(list1)
4+
list1.sort()
5+
print("Largest element is:", list1[length-1])
6+
print("Smallest element is:", list1[0])
7+
print("Second Largest element is:", list1[length-2])
8+
print("Second Smallest element is:", list1[1])
9+
10+
# Driver Code
11+
list1=[12, 45, 2, 41, 31, 10, 8, 6, 4]
12+
Largest = find_len(list1)

0 commit comments

Comments
 (0)