Rewrite as a comprehension, as suggested by Harlan.