python - Searching for a partial match in a list of tuples -


if have list of tuples:

[(0,1),(1,2),(5,5),(4,1)] 

how can find items partially match search term?

eg, in above example, (_, 1) should match (0, 1) , (4, 1).

new_list = [i in old_list if i[1] == 1] 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -