How to convert input list to string in python

后端 未结 0 551
-上瘾入骨i
-上瘾入骨i 2021-01-29 11:50

L = [1,2,3]       

q = " ".join(str(x) for x in L)

print(q)

# as you see input is = L = [1,2,3]

# when you run the code output = 1 2 3

b

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