Discuss / Python / bh打卡day11

bh打卡day11

路由跳变

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

  n1,n2 = 0, len(s)-1

    while n1<len(s) and s[n1]==' ':

      n1+=1

    while n2>0 and s[n2]==' ':

      n2-=1

    return s[n1:n2+1]


  • 1

Reply