Skip to main content
 首页 » 编程设计

Python 水平打印字符串列表,不带引号或括号

2025年05月04日43pengyingh

<分区>

我有一个 list

    l1 = ['a','b','c','d','e']   

当我运行 print l1 时,它返回:

    ['a','b','c','d','e'] 

当我尝试

    for a in l1 
        print ' '.join(map(str,a)) 

我明白了

    a   
    b   
    c   
    d   
    e   

我想得到的是

    a b c d e