Introduction to Sets

  • + 0 comments

    from functools import reduce

    def average(array): st = set(array) sm = reduce(lambda x,y: x+y, list(st))
    return sm/len(st)