美文网首页
无标题文章

无标题文章

作者: glennguan | 来源:发表于2016-08-19 16:45 被阅读0次
print a + b
print sorted(L)  # 返回新的list
print a[::-1]   # 切片的知识点
print ",".join([str(x) for x in a])   # 列表解析式和join方法,参数是str instance
print a[::2]
def prime(n):

    if n == 2:

        return True

    for i in range(2, n):

        if n % i ==0:

            return False

    return True

print [x for x in range(2, 100) if prime(x)]
L = sorted(L)
length = len(L)/2.0
if len(L) % 2 ==0:
    print (L[int(length-1]+L[int(length)])/2.0
else:
    print L[int(length)]
print a*b, (a+b)*2
def lcm(a, b):
    if a >b:
        greater = a
    else:
        greater = b
    while True:
        if greater % a ==0 and greater % b ==0:
            lcm = greater
            break
        greater +=1
    return lcm
print [x for x in range(1,min(a,b)) if a % x ==0 and b % x ==0][-1]
sum_i = 1
count = 0
for i in L:
    sum_i *= i
s = str(sum)[::-1]
for i in s:
    if i == '0':
        count +=1
    else:
        break
print count
sum_i = 1
count = 0
for i in L:
    sum_i *= i
s = str(sum)[::-1]
for i in s:
    if i !='0' and int(i) % 2 ==0:
        print 0
    elif i !='0' and int(i) % 2 !=0:
        print 1

相关文章

  • 无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章 无标题文章无标题文章无标题文章无...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • fasfsdfdf

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标...

  • 无标题文章

    无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章无标题文章

  • 无标题文章

    无标题文章 无标题文章 无标题文章无标题文章 无标题文章 无标题文章

网友评论

      本文标题:无标题文章

      本文链接:https://www.haomeiwen.com/subject/rambsttx.html