Skip to content

Instantly share code, notes, and snippets.

View DeviaVir's full-sized avatar
🏴‍☠️

Chase DeviaVir

🏴‍☠️
View GitHub Profile
class Node:
def __init__(self, data):
self.data = data
self.next = None
self.prev = None
class LinkedList:
def __init__(self):
self.root = None
def fib():
a, b = 0, 1
while True:
yield a
a, b = b, a + b
def main(i=0):
if i is 0:
return 0
def main():
values = map(int, raw_input().split(','))
return reduce(lambda x, y: x ^ y, values)
print main()
# Because ^ (XOR) returns 0 for each pair and there is only one unpaired item in the input.
# E.g.
# 1 ^ 1 = 0