I wrote this code based on the values that the exercise gave and I passed, but I'd like to improve it to become useful with another values.

Any suggestions to do this without using advanced tools? I'd like to do it with only the knowledge that I have now.

```
b1 = list(raw_input('First number:'))
b2 = list(raw_input('Second number:'))
def or_function(x, y):
for n in x:
if n == '0':
x.remove(n)
for n in y:
if n == '0':
y.remove(n)
xtotal = x.count('1')
ytotal = y.count('1')
xy = x + y
result = ''.join(xy)
result = int(result, 2)
while xtotal != ytotal:
result >>= 1
if xtotal > ytotal:
ytotal += 1
elif xtotal < ytotal:
xtotal += 1
else:
break
print bin(result)
or_function(b1, b2)
```