fork download
  1. #!/usr/bin/env python3
  2.  
  3. def foo(Data, i):
  4. return Data[:i+2] + str(0 if Data[i] == 0 else 1) + Data[i+3:]
  5.  
  6. if __name__ == '__main__':
  7. print(foo(bin(26), 2))
  8.  
Success #stdin #stdout 0.02s 9696KB
stdin
Standard input is empty
stdout
0b11110