cómo mantener solo los objetos certianos python

rm(list=setdiff(ls(), "x"))
Lovely Lion