Have anyone ever experienced this statement? The following code looks work well, but it makes my laptop get stuck when the exponent reaches 9 or above.
ordered_tuple = tuple(range(10**9))
Every time I run this statement, my laptop slows down, got stuck taking up 100% of RAM usage. I searched for the reason why this happened, but there was no suitable answer.
Please help me understand why this code makes computers busy. Thanks in advance.
I tried with different exponent between [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. 1-8 works fairly well as I expected.
ordered_tuple = tuple(range(10**1))
ordered_tuple = tuple(range(10**2))
ordered_tuple = tuple(range(10**3))
ordered_tuple = tuple(range(10**4))
ordered_tuple = tuple(range(10**5))
ordered_tuple = tuple(range(10**6))
ordered_tuple = tuple(range(10**7))
ordered_tuple = tuple(range(10**8))
whereas 9, 10 doesn't work.