标签:iter a+b int too == tool perm tools result
import itertools
for (a,b,c,d,e,f,g,h) in list( itertools.permutations( [‘0‘,‘1‘,‘2‘,‘3‘,‘4‘,‘5‘,‘6‘,‘7‘,‘8‘,‘9‘], 8 ) ):
if int( e+d+f+g ) + int( a+b+c+d ) == int( a+b+f+d+h ):
print (‘result: ‘,a,b,c,d)
标签:iter a+b int too == tool perm tools result
原文地址:https://www.cnblogs.com/DennyT/p/11331302.html