How do you check that a dictionary is in an array even in the worng order in python? -
lets have :
winning_numbers = [{345}, {238}, {321} ] players_numbers = {435}
i want return true players_numbers in the array if not in right order. how can tackle doing this?
you should make winning numbers set
>>> winning_numbers = [ {3, 4, 5}, {2, 3, 8}, {3, 2, 1} ] >>> players_numbers = {4, 3, 5} >>> players_numbers in winning_numbers true