loading...

re: Daily Challenge #35 - Find the Outlier VIEW POST

FULL DISCUSSION
 

Python

def find_outlier(integers):
    a= sum(map(int,[integers[0]%2,integers[1]%2,integers[2]%2]))
    if a == 0 or a== 1:
       for i in integers:
           if i % 2 == 1:   return i
    else:
        for i in integers:
            if i % 2 == 0:   return i
code of conduct - report abuse