def addBinary(a, b): l = list( imap( str, add_by_digit( izip_longest( imap(int, a[::-1]), imap(int, b[::-1]), fill=0), base=2))) return "".join(l[::-1])
def addTwoNumbers(l1, l2): return list_node_from_iter( add_by_digit(izip_longest(*map(list_node_to_iter, [l1, l2]), fill=0)))
def plusOne(digits): l = list(add_by_digit(izip_longest(digits[::-1], [1], fill=0))) return l[::-1]
def addTwoNumbers(l1, l2): return list_node_from_iter(add_by_digit(izip_longest(*map(list_node_to_iter, [l1, l2]), fill=0)))