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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -