How can I flip binary strings in python3?
If I have 001011, it should output 110100.
I want to define it def flip(binary_string)
here is what I've tried:
def flip(binary_string):
for bit in binary_string:
if bit == "1":
"1" == "0"
else:
"0" == 1
return binary_string