Nov-27-2021, 09:30 AM
Hi, I have a query about how to create a list of subsets from a given list. I tried doing it but I couldn't get the correct output.
For example, if the given list is [1,4,2,7], then if I take index-based, these are the subsets I need [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)].
Can you please help me with the logic to find subsets?
For example, if the given list is [1,4,2,7], then if I take index-based, these are the subsets I need [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)].
Can you please help me with the logic to find subsets?