prefs =
{
's1': ["a", "b", "c", "d", "e"],
's2': ["c", "d", "e", "a", "b"],
's3': ["a", "b", "c", "d", "e"],
's4': ["c", "d", "e", "b", "e"]
}
I have a dictionary, and I want to compare the values (Type: List) for each key to see if they exist in that order. So essentially I'm trying to iterate over each key-value pair and compare the value which is of type list to the next value to see if the elements in that list match in that specific order. If we find a match, I want to return a list of keys that make the match.
ex: s1 value is a list with elements "a", "b", "c", "d", "e", so I want to check other values with the elements in the same order. So in this case key s3 would be returned since the values match with the same exact order. s1 value = s3 value because of the elements in the list match in the same order. return list would be something like [s1:s3], and multiple matches should be returned.