#列表转字符串(字符串加数字): li = [11, 22, 33, "asd", "xyz", "879", "hello"] s = "" for item in li: s = s + str(item) print(s)
#列表转字符串(只有字符串): li = ["ety", "xyz", "hello", "world"] s = "".join(li) print(s)
#列表转字符串(字符串加数字): li = [11, 22, 33, "asd", "xyz", "879", "hello"] s = "" for item in li: s = s + str(item) print(s)
#列表转字符串(只有字符串): li = ["ety", "xyz", "hello", "world"] s = "".join(li) print(s)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。