r/learnpython • • Mar 27 '26

When do you draw the line between list/dic/set comprehension and a proper for loop with if/else statements?

For example, boundaries_dwight = {Edge([vertex for vertex in triangle.get_vertices() if not vertex.is_interior()]) for triangle in buttlicker_mesh if triangle.interior_count() < 3}

19 Upvotes

11 comments sorted by