你理解了吗?该循环会将列表 my_class 中的每个值运行一次。

列表值是 student ,每次循环运行时,列表 my_class 中将有一个值:首先是 "Ken",然后是 "Mark""Sandy",最后是 "Sabrina"。循环在最后一个值之后停止。

每次循环运行时, student 的当前值都将使用 += 添加到字符串 in_class 中。

  • 点击 运行 并查看控制台。然后使用代码来回答问题。

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)