dd=[(1,'a',2),(2,'b',4),(5,'a',4)] d1=[x for x in dd if x[1] == 'a'] print (d1)
[(1, 'a', 2), (5, 'a', 4)]
[x for x in dd if x[1]=='a']
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)