Discuss / Python / 20180502

20180502

Topic source

Gday小海狮

#1 Created at ... [Delete] [Delete and Lock User]
  1. high = s.split('.')[0] lower = s.split('.')[1] def f(x,y):

    return x * 10 + y
    

    result = reduce(f,map(int,high)) + reduce(f,map(int,lower))/1000 return result

    2. def prod(L): def f(x1,x2):

    return x1 * x2
    

    return reduce(f,L)

    1. def normalize(name): return name.capitalize()

tony12345

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

result = reduce(f,map(int,high)) + reduce(f,map(int,lower))/1000 这句除1000是有缺陷的


  • 1

Reply