Skip to main content
2 of 2
Commonmark migration

Python 3 - 50 bytes

r=str.replace r(r(r(input(),'1','a'),'0','1'),'a','0') 

It's not as short as some of the other ones, but it takes a different approach.

daviewales
  • 281
  • 1
  • 6