Problem

Description

There is an array with some numbers. All numbers are equal except for one. Try to find it!

Test Cases

findUniq([ 1, 1, 1, 2, 1, 1 ]) === 2
findUniq([ 0, 0, 0.55, 0, 0 ]) === 0.55

Solution

My Solution

def find_uniq(arr):
    return next(i for i in set(arr) if arr.count(i) == 1)

Other Solutions

Learning Experiences