We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Sets
- Introduction to Sets
- Discussions
Introduction to Sets
Introduction to Sets
Sort by
recency
|
618 Discussions
|
Please Login in order to post a comment
def average(array): Set_array = set(array) return sum(Set_array)/len(Set_array)
from functools import reduce
def average(array): st = set(array) sm = reduce(lambda x,y: x+y, list(st))
return sm/len(st)