Discuss / Python / 我也来一个

我也来一个

Topic source
def is_palindrome(n):
    return str(n)[::-1] == str(n)
output = filter(is_palindrome, range(1, 1000))
print(list(output))

涨潮lucky

#2 Created at ... [Delete] [Delete and Lock User]

你牛逼,我做的和你差远了

赞!

-1真是神来之笔

厉害!谢谢

绝对大神

zooyooloo

#7 Created at ... [Delete] [Delete and Lock User]

太精妙了,看来半天不懂-1是什么意思,自己亲自验证之后才知道-1的作用是吧字符串反过来写。感谢分享。


  • 1

Reply