How to change if the i th bit is 1,replace with (i+1) bit in python?

后端 未结 0 1350
谎友^
谎友^ 2020-12-31 04:29

for example read a number=23 and a bit position=2,after checking the i th position replace it with (i+1)th bit.

n = int(input("Enter a number: "))
p         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题