What is sys.maxint in Python 3?

1.0K    Asked by LisaHenderson in Python , Asked on Feb 9, 2021

I've been trying to find out how to represent a maximum integer, and I've read to use "sys.maxint". However, in Python 3 when I call it I get:

AttributeError: module 'object' has no attribute 'maxing'

Answered by Lisa Henderson

To solve maxint python you can follow the below mentioned code-

import sys 
INT_MAX = sys.maxsize
INT_MIN = -sys.maxsize-1
print(INT_MAX,INT_MIN)

Your Answer

Interviews

Parent Categories