Мне нужно сделать следующее:
list1 = [2,4,6,8]
list2 = [2,4,6,8]
Я уже пытался сделать 2 цикла для каждого из списков.
Затем и попробуйте удалить последний элемент. Еще не работал.
#I need to iter them and get combinations as follow:
[2,2]
[2,4]
[2,6]
[2,8] #this would be the largest element
[4,2]
[4,4]
[4,6] #then maximum minus one element
[6,2]
[6,4] #then maximum minus one element
[8,2] #until the first element is the last one