python get max integer code example Example 1: max int python import sys MAX_INT = sys.maxsize - 1 Example 2: how to get maximum value of number in python float('inf')