js代码:
var a = '123';
console.log(a >> 2); // result : 30
python(3)代码:
a = '123'
print(a >> 2) # TypeError: unsupported operand type(s) for >>: 'str' and 'int'
请问一下位各位大佬:
如何把上面这段js翻译成python ? 谢谢!
js代码:
var a = '123';
console.log(a >> 2); // result : 30
python(3)代码:
a = '123'
print(a >> 2) # TypeError: unsupported operand type(s) for >>: 'str' and 'int'
请问一下位各位大佬:
如何把上面这段js翻译成python ? 谢谢!
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
int(a) >> 2