Comment garder uniquement des objets certian python

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