So essentially I'm prompting the user for two binary numbers. How can I add these together? I don't know how to get the 0b in front the the original input. If there is an easier way to do it, please let me know.
#Prompt the user for two binary numbers
bin1 = raw_input("Please enter a binary number: ")
bin2 = raw_input("Please enter another binary number: ")
binstr1 = str(bin1)
binstr2 = str(bin2)
#Check to verify that the user input two binary numbers
while '1' and '0' in binstr1, binstr1:
binstr1 = raw_input("You did not enter a binary number, Please try again: ")
This is what I have so far, but it doesn't work and have hit a wall.