def is_tm(x): if x<10: return False s=str(x) l,i=len(s)//2,1 for n in s[:l]: if n!=s[-i]: return False i+=1 return True tm=filter(is_tm,list(range(1000))) print(list(tm))
Sign in to make a reply
叫小小兽