i have variable a with binary values then i have variable b with another set of binary values, i want variable b to into variable a and stored into variable c, i hope that not confusing


a = "01101000011001010111100100000000000000000000"


b = "011000100111100101100101"

c = "01100010011110010110010100000000000000000000"

Lists are the easiest and quickest way to work with data IMHO. You can then join the elements into one string http://www.diveintopython.net/native_data_types/joining_lists.html.

a = "01101000011001010111100100000000000000000000"


b = "011000100111100101100101"

combined_list=[]
combined_list.append(b)
combined_list.append(a[len(b):])  ## slice off length of "b"
print "".join(combined_list)

## result
01100010011110010110010100000000000000000000