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
|
562 Discussions
|
Please Login in order to post a comment
def average(array):
Found a simple solution**
here is my code:
def average(array): arr = list(set(array)) arr.sort() result = sum(arr) / len(arr) return result