how to simply align semicolon from strings in Python?

后端 未结 0 367
野的像风
野的像风 2020-12-14 08:23

I need to align semicolon in strings. For Example:

Input:
  1-1: abc
  1-2-1: defghi
  1-2-1a: jklmnopqr
  1-2-1a-1-1-1a: stuvwxyz

Ouput:
  1-1          : ab         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题