Filtering tuples inside tuple

  python, tuples

I am trying to filter a big number of tuples that look like this one:

tuple = ([], [('print', -108.0), ('denim', -144.0), ('floral', -158.0), ('summer', -172.0), ('chiffon', -217.0), ('crochet', -272.0), ('cotton', -275.0), ('graphic', -279.0), ('pattern', -281.0), ('sheer', -294.0)])

What I am trying to do is to create some lines of code that I can use to say to Python that I want to retrieve a list that contains just the strings with a number that is higher than -200,in this case I would like to obtain:

list = ["print", "denim", "floral", "summer"]

Source: Python Questions

LEAVE A COMMENT