I have a list which contain values input = [1, 2, 3] and would need all the possible combination of this values i.e. Output = [[], [1], [2], [3], [1,2], [1,3], [2, 3], [1,2,3]].
I have used below code but it is not showing exact output values.
output = permutations([1, 2, 3], 2)
for i in output:
print(list(i))
Can someone help me with this?