Created
March 13, 2017 14:38
-
-
Save els-pnw/936faed3ace06c1575e46e131dc4e74c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_outlier(integers): | |
parities = [] | |
for i in integers: | |
parities.append(i & 1) | |
return integers[parities.index((parities[0] in parities[1:3]) ^ parities[0])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment