Largest list index

Easysys Module Programs · 14 of 20

Write a Python program that prints sys.maxsize and shows ints can be bigger.

Advertisement
Output
True
True

Approach

  1. sys.maxsize limits sizes, not integer values.

Solution

Python
import sys print(sys.maxsize == 2 ** 63 - 1)print(sys.maxsize + 1 > sys.maxsize)
Output
True
True

Learn the concept

New to this topic? Read the lesson, then come back.

More sys module programs

← All 20 sys Module Programs

Leave a Comment