小编Nir*_*aut的帖子

* 在Python中的打印函数中

text = 'PYTHON'
for index in range(len(text)):
    print(*text[:index + 1])
Run Code Online (Sandbox Code Playgroud)

print函数中的 *在sys.stdout上的字符之间产生空格。有人可以告诉我它叫什么名字以及它实际上有什么作用吗?

python printing string stdout

4
推荐指数
1
解决办法
8863
查看次数

标签 统计

printing ×1

python ×1

stdout ×1

string ×1