python获取最大值

python2 中获取int最大值

import sys

print sys.maxint

但是在python3中,报错:

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

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

import sys

print( sys.maxsize)

猜你喜欢

转载自www.cnblogs.com/whu-2017/p/9028813.html
今日推荐