【发布时间】:2019-07-25 02:42:46
【问题描述】:
除了一些文字之外,我正在尝试打印我最喜欢的游戏列表。
代码:
favGames = ["The Division", "WoW", "Legend of Zelda", "Super Smash Bros."]
print("Here are some of my favorite games! " + favGames)
期望: 我希望只是得到一个打印行:
Here are some of my favorite games! The Division, WoW, Legend of Zelda, Super Smash Bros.
我收到以下错误消息: TypeError:只能将列表(不是“str”)连接到列表
【问题讨论】:
标签: python string list printing