教材:《Python编程 从入门到实践》
3-4:嘉宾名单
# 3-4 Guests!
guests = [
'Jared "PiG" Krensel', 'Evan "Winter" Ballnik', 'Simon "Lowko" Heijnen',
'Austin "Neuro" Filsinger'
]
for guest in guests:
print("Dear " + guest + ", do I own the honor to have dinner with you?")
输出:
Dear Jared "PiG" Krensel, do I own the honor to have dinner with you?
Dear Evan "Winter" Ballnik, do I own the honor to have dinner with you?
Dear Simon "Lowko" Heijnen, do I own the honor to have dinner with you?
Dear Austin "Neuro" Filsinger, do I own the honor to have dinner with you?
3-6:添加嘉宾
# 3-6