PythiloEasy · 12 min · Task 48 of 100 · progress kept in this browser

Add binary strings

Add two nonempty strings containing only binary digits. Return a canonical binary string with no leading zeros, except zero itself. Do not convert inputs to integers.

left, right, carry = 1, 1, 1
total = left+right+carry
print(total % 2, total // 2)
Your task

Add two nonempty strings containing only binary digits. Return a canonical binary string with no leading zeros, except zero itself. Do not convert inputs to integers.