python基础练习题之拼接字符串列表
# 使用join
"""
有个字符串"abc"
如何把字符串单个字符串联起来
得到字符串 "a_b_c"
"""
b = "abc"
print("_".join(b))
print(type(b))
"""
有个列表 ["hello", "world", "你好"]
如何把列表里面的字符串联起来,
得到字符串 "hello_world_你好"
"""
a = ["hello", "world", "你好"]
print("_".join(a))
print(type(a))