Inconsistent behaviour of int.to_bytes() in Python 3.7

后端 未结 0 559
忘了有多久
忘了有多久 2020-11-30 03:57

When I write:

expint = 34614  
expint = expint.to_bytes(2,\'big\')

I get a value of expint = b\'\\x876\' instead of b\'\\x87\\x36\'(the 3 is

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