Заменить все «1» на «0», а все «0» на «1» n="111000"n=n.replace("1","x")n=n.replace("0","1")n=n.replace("x","0")print(n)