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 ? 谢谢!
13 回答12.7k 阅读
2 回答4.9k 阅读✓ 已解决
7 回答1.8k 阅读
2 回答1k 阅读✓ 已解决
3 回答1k 阅读✓ 已解决
4 回答813 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
int(a) >> 2