Discuss / Python / 实现的原理还是依靠c语言,python的特性不会使用

实现的原理还是依靠c语言,python的特性不会使用

Topic source

里昂tcxy

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

def is_palindrome(n):

    c = str(n)

    n = len(c)

    count = 0

    for i in range(n):

        if c[i]==c[n-1-i]:

            count+=1

            if count>n/2:

                return n

Garvis_

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

^_^找到了一位和我一样的小伙伴,我也是,学着python,想着C


  • 1

Reply