所以。。我想把列表中的所有对象放在一起,我的想法是创建一个没有任何内容的变量,并创建一个for循环,将字符串添加到变量中。。。但没用:(有什么帮助吗?你知道吗
我搜索了一个答案,但在网上找不到任何东西。。。我很抱歉,如果我错了。你知道吗
sounds = ["super", "cali", "fragil", "istic", "expi", "ali", "docious"]
x=""
for s in sounds:
x+s
print(x)
我希望x在最后是“超级资格的专家”。你知道吗
Tags:
您可以使用
join
:至于您的解决方案,您缺少一个
=
:你会得到同样的结果:
相关问题 更多 >
编程相关推荐