📌  相关文章
📜  将列表转换为字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.078000             🧑  作者: Mango

代码示例6
import random
word_list = ["aardvark", "baboon", "camel"]
chosen_word = random.choice(word_list)
word_length = len(chosen_word)

#Create blanks
display = []
for _ in range(word_length):
    display += "_"
    
print(f"{' '.join(display)}")