Challenge - #38 - Introduction to Sets

 def average(array):

    # your code goes here
    lst = list(set(array))
    avg_height = sum(lst)/len(lst)
    return avg_height

if __name__ == '__main__':
    n = int(input())
    arr = list(map(intinput().split()))
    result = average(arr)
    print(result)

Comments

Popular posts from this blog

Challenge - #48 - Incorrect Regex

Challenge - #43 - Time Delta