Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find all pairs in list

# importing required ibrary
import itertools
  
  
# declaring a list
lst = [2,2,2]
  
# creating a list of pairs of the list
ordered_list = itertools.permutations(lst,2)
  
print(list(ordered_list))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #find #pairs #list
ADD COMMENT
Topic
Name
2+6 =