【发布时间】:2017-08-08 18:53:43
【问题描述】:
这是我的代码:
>>> hellos = [ "hello", "bonjour", "hola"]
>>> for hi in hellos:
... print(hi + " World!")
...
hello World!
bonjour World!
hola World!
>>> hellos = [ "hello", "bonjour", "hola"]
>>> for hi in hellos:
... print("hi" + " World!")
...
hi World!
hi World!
hi World!
【问题讨论】:
-
请修正格式
-
你期望输出是什么?
-
因为当你在
"..."中包含一些东西时,它是一个字符串 -
nedbatchelder.com/text/names.html - 可能是一个好的开始
标签: python python-3.x syntax