I\'m trying to take a binary number in string form and flip the 1\'s and 0\'s, that is, change all of the 1\'s in the string to 0\'s, and all of the 0\'s to 1\'s. I\'m new t
Another way to do it is with string.translate() and string.maketrans()
from string import maketrans bitString = "10101010100011010" flippedString = bitString.translate(maketrans("10","01"))