check for consecutive values membership in arrays
best way to maintain a mapping of elements in an array to a value is a hash table.
as @JacobIRR mentioned {[4, 5, 6] : 6} is not valid because you cant have multiple keys associated to a value. i cant give you an exact solution to your problem as you didnt mention how your function works.
if your algorithm dosent depend on a list as a key,you can try  {6 :[4, 5, 6]} will be a valid solution as HashMap doesn't allow duplicate keys but allows duplicate values.
There are several similar questions around that suggest using any() with sets, however mine is a bit different in a way that I want to get the most effective and Pythonic way of forming a new array out of existing arrays based on membership.
I have the following array [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 5, 6], [2, 4, 5, 6, 9, 1, 4, 5, 6, 4, 5, 6], [1, 2, 9, 4, 5, 6, 7, 7, 8, 5]]
What I need is a way to form a new object {[4, 5, 6] : 6} where [4, 5, 6] is the key, and 6 is the number of times the key sequence appears in the array above.
I have achieved the result by making a function with simple for loops, but I don't think it is the most Pythonic and efficient way of achieving it. I was thinking of using map() and filter() as well.
What would be the most efficient and Pythonic way of achieving the result?