Permutation of first few integers in Python -


I want to go through all the permutations of Python (1,2,3,4,5) For some sort of calculation, such as

  in the permutation lists for li: # Calculation list = [[1,2,3,4,5], [1,2,3,5] , 4], ...] Print Lei [0] - L [1] + Lee [2] -li [3] + Lee [4]  

Through all these passages What would be a convenient way to iterate (As Ashwin Choudhary said in the comment: <2,3,4,5)?

/ P>

  permutes = permutations of parameters to import ([1, 2,3,4,5]) permits in li: # do stuff  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -