这样也没问题,判断条件不一样
print [m*100+n*10+h for m in range(1,10) for n in range(0,10) for h in range(1,10) if m*100+n*10+h == h*100+n*10+m]
print [m*100+n*10+h for m in range(1,10) for n in range(0,10) for h in range(1,10) if m*100+n*10+h == h*100+n*10+m]
2019-12-13
举报