python2 中获取int最大值

import sys

print sys.maxint

 

 

但是在python3中,报错:

AttributeError: module 'sys' has no attribute 'maxint'

 

看了官网文档后了解python3中没有maxint了,只有maxsize

import sys

print( sys.maxsize)

 

相关文章:

  • 2021-11-19
  • 2021-06-27
  • 2021-07-03
  • 2021-12-27
  • 2021-12-27
  • 2021-09-19
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案