I want to group every element in the list with all other elements in the list
for ex -
l1 = [1,2,3]
l2 = [(1,2),(1,3),(2,3)]
I try using zip:
l2 = list(zip(l1,l1[1:]))
but it gives me:
l2 = [(1, 2), (2, 3)]
DESIRED OUTPUT:
[(1,2),(1,3),(2,3)]
for
[1,2,3]