0
For a list li, I want to print only the values of the triplets a, b, c where 0 <= a < b < c < len(li) and a, b and c are indices of li.
Example:
f([6, 3, 88, 4])
6 3 88
6 3 4
6 88 4
3 88 4
Here is my solution, but it is O(n**3) (time complexity):
def f(li):
for i, n in enumerate(li):
...