python 怎么把列表的[]去掉

2024-10-29 18:55:38

1、创建一变量xx=['a','b','c','d']

python 怎么把列表的[]去掉

3、创建变量y接受去掉后的[]y=x[0]+x[1]+x[2]+x[3]y="'"稆糨孝汶;+x[0]+"','"+x[1]+"','"+x[2]+"','"+x[3]+"'"

python 怎么把列表的[]去掉

4、输出最终的结果1

python 怎么把列表的[]去掉

6、当然可以看起来更加高大尚一点print(争犸禀淫",".join(str(i) for i in x))

python 怎么把列表的[]去掉
猜你喜欢