O'Reilly logo
  • Vlad Bezden thinks this is interesting:

filtered={key:value for key, value in count.items() if value <20 and value>16 }

From

Cover of Hands-On Data Structures and Algorithms with Python

Note

filtered={key:value for key, value in count.items() if 16 < value < 20 }