我正在尝试显示文章,输入后我们可以看到表格,说明不匹配。
The description does not go on wtih his string.
dico = {0: "Green", 1: "Red", 2: "Blue", 3: "Purple", 4: "Yellow", 5: "Orange"}
questionA = "What's your name? "
questionB = "Hi {0}, now that I know your name what is your favorite color? "
answer = "interesting {0}, your favorite color is {1} I seriously thought it would be a {2}"
# dialogs with user
# 1
name = input(questionA)
# 2
Favorite_Color = input(questionB.format(name))
# Remove favorite colour from dico
for key in dico:
if dico[key] == Favorite_Color:
break
try:
del(dico[key])
except:
pass
print("dico : ", dico)
# 3
print(answer.format(name, Favorite_Color, dico[random.randint(0, len(dico)-1)]))
答案 0 :(得分:0)
在说明<th>
后添加3个空白<th>
,并检查在创建文章时是否在说明前插入空白。