programming-examples/python/Sets/Python program to find maximum and the minimum value in a set.py

6 lines
137 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
#Create a set
seta = set([5, 10, 3, 15, 2, 20])
#Find maximum value
print(max(seta))
#Find minimum value
print(min(seta))