Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created Jun 15, 2020
Embed
What would you like to do?
s1={1,2,3,4,5}
print (len(s1)) #Output:5
print (min(s1))#Output:1
print (max(s1)) #Output:5
print (sum(s1)) #Output:15
s2={'red','blue','green'}
print (len(s2)) #Output:3
print (min(s2))#Output:blue
print (max(s2)) #Output:red
print (sum(s2))#Output: TypeError: unsupported operand type(s) for +: 'int' and 'str'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment