python基础题目100例之五十四 取一个整数a从右端开始的4~7位 a = int(input('输入一个数字:')) b = a >> 4 c = ~(~0 << 4) d = b & c print(b) print(c) print(f'{a:o}\t{b:o}')