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
|
585 Discussions
|
Please Login in order to post a comment
Here is my solution for the day!!😀
def average(array): e=set(array) l=len(e) a=sum(e) ave=a/l return ave
if name == 'main': n = int(input()) arr = list(map(int, input().split())) result = average(arr) print(result)