Ant Problem with List Comprehension

I tried to do a couple but I couldn't rewrite every single part with it.