I have a list like this:
A=[(1,\'A\'),(2,\'H\'),(3,\'K\'),(4,\'J\')]
Each member of this list is like this: (number, string)
Now i
Use a list comprehension:
[y for x,y in A if x>2]
Demo:
>>> A=[(1,'A'),(2,'H'),(3,'K'),(4,'J')] >>> [y for x,y in A if x>2] ['K', 'J'] >>>