1 2 3 4 5 6 7
l = list(range(10000)) hex(1) try: 100000000 * l except MemoryError: print('MemoryError') print(len(l), l[0], l[-1])