Split string by count of characters

前端 未结 8 2392
青春惊慌失措
青春惊慌失措 2020-11-30 07:45

I can\'t figure out how to do this with string methods:

In my file I have something like 1.012345e0070.123414e-004-0.1234567891.21423... which means there is no deli

8条回答
  •  半阙折子戏
    2020-11-30 07:56

    Try this function:

    x = "1.012345e0070.123414e-004-0.1234567891.21423"
    while len(x)>0:
      v = x[:12]
      print v
      x = x[12:]
    

提交回复
热议问题