Hi here is my code that looks for values that repeat 3 or more times in list a:
a = ['1','1','1','2','2','3']
b = ['4','5','1','7','8','4']
d = [item for item in a if a.count(item) >= 3]
print(d)
# ['1', '1', '1']
So my question is how can I also read the corresponding values in list b. Also list a and b are always the same size. My desired output should be:
output: [['1', '1', '1'], ['4', '5', '1']]
thank you!