Advertisement
Peaser

xor

Aug 17th, 2015
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. def xor(list):
  2.     #List based truth function similar to "all" and "any"
  3.     return len([i for i in list if i]) == 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement