Discuss / Python / 小白新上手,请多多指教呀

小白新上手,请多多指教呀

Topic source

___iFancy

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

def is_palindrome(n):

    x = str(n)

    i = -1

    while i<len(x):

        i=i+1

        return x[i]==x[-i-1]


  • 1

Reply