subject : Yes 5 Arrays of different lengths a1,a2,a3,a4,a5, Now take a number from the array , Form a new array , Request from a1 The number taken out must be less than from a2 Number taken , From the same principle a2 The number taken out must be less than from a3 Number taken , and so on , Lists all arrays that meet the criteria .

The title is quite simple , Take a look at it , And then I used a bunch of them for the first time for loop , The script is as follows :
a1 = [1,2,4] a2 = [2,3,4,5] a3 = [1,4,7] a4 = [3,6,7,8] a5 = [3,6,8,9,10] for i
in a1: for j in a2: for k in a3: for l in a4: for m in a5: if i<j<k<l<m: print(i

The output is right , But look at this pile for loop , I always feel uncomfortable , After a search , Found out itertools.product(A,
B) This function , This function returns A,B Tuple of Cartesian product of elements in , Seems to meet the conditions , So the script above changes to the following
import itertools for i in itertools.product(a1,a2,a3,a4,a5): if i[0]<i[1]<i[2]<
i[3]<i[4]: print(i)

©2020 ioDraw All rights reserved
vue + element Secondary packaging is more flexible Select assembly react Background management configuration route and sidebar :python code , Easy to complete Snake games Advanced front end -Vue Component world html+css Realize loading animation Attack and defense world forgot—— A dazzling question ( Detailed dish chicken ) Voting mechanism of ensemble learning (Voting mechanism about ensemble learning) Three categories and six sorting algorithms -C From recruitment to resume to find a fresh university student in the company Madness theory java Study notes ---JAVA Basic grammar