Python Exercise: Find maximum and the minimum value in a set
Python sets: Exercise-14 with Solution
Write a Python program to find maximum and the minimum value in a set.
#Create a set seta = set([5, 10, 3, 15, 2, 20]) #Find maximum value print(max(seta)) #Find minimum value print(min(seta))
Python Code Editor:
Improve this sample solution and post your code through Disqus