I have two sets, each containing numerous tuples:
s1 = set([('a','b','c'), ('d','e','f'), ('g','h','i'), ('j','k','l'), ('m','n','o')])
s2 = set([('a','y','z'), ('p','q','r'), ('s','t','u'), ('v','w','x')])
Each tuple contains a number of strings(in this case 3). Also each tuple has an id which is the first element. I want to check which tuple has the same id in both sets but different following values like (a,b,c) in s1 and (a,y,z) in s2 and output this.
Do you have to have the exact tuple to check if it's in the set using in and how do you then access this tuple to print it out?