didn't someone post a piece of code here that would unset the python standard library? if so, what was it?
Might also want to take a look at https://gynvael.coldwind.pl/n/python_sandbox_escape (if what you're doing is try to sandbox it)
guess you could write a “jailbreak” w that