Get a list of True values inside a *Namespace* in Python

list_true_keys = [ k for (k, v) in ns.items() if v ]