直接求整数
print [x for x in range(100,1000) for int(x/100) in range(1,10) for int((x%100)/10) in range(0,10) for (x%100)%10 in range(0,10) if int(x/100) == (x%100)%10]
求解,这个为什么不可运行呢?
print [x for x in range(100,1000) for int(x/100) in range(1,10) for int((x%100)/10) in range(0,10) for (x%100)%10 in range(0,10) if int(x/100) == (x%100)%10]
求解,这个为什么不可运行呢?
2018-12-19
举报