Formatting a list of text into columns

前端 未结 8 1032
我在风中等你
我在风中等你 2021-02-07 08:34

I\'m trying to output a list of string values into a 2 column format. The standard way of making a list of strings into \"normal text\" is by using the string.join

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 09:31

    This might also help you.

    for i in skills_defs:
    if skills_defs.index(i)%2 ==0:
        print(i.ljust(30),end = " ")
    else:
        print(i.ljust(30))
    

提交回复
热议问题