l=[11] # Initial Setup
def f(x): return 1 if x<2 else x*f(x-1)
# factorial
def s(x): return int(x**0.5)
# square root
for i in range(1001): # repeat 1000 times here
l += list(map(f, l))
l += list(map(s, l))
l = sorted(list(set(l))) # clear duplicates and sort
print(l) # report
[3, 11, 6317, 39916800]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3444, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)