def cut_text(text,lenth): 
 textArr = re.findall('.{'+str(lenth)+'}', text) 
 textArr.append(text[(len(textArr)*lenth):]) 
 return textArr 
  
print(cut_text('123456789abcdefg',3)) 

 

相关文章:

  • 2021-10-01
  • 2021-11-13
  • 2022-12-23
  • 2021-11-21
  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案