Group for group in

#1

Page 163

return[
   group for group in sorted_string_to_anagrams.values() if len(group) >= 2
]

Can someone explain this stmt to me pls? Thx

0 Likes

#2

Oh, I get it. This is a list comprehension. Sometimes it takes posting a question to figure out the answer yourself!! :slight_smile:

0 Likes