第 14 步:我们更新了高分列表,但现在我们需要将更新后的数据添加到新的 CSV 文件中!
- 这个函数需要两个参数:我们正在写入的新文件的名称和我们更新的数据。
- 在,在上面写着: MAIN FUNCTION的地方拖入Define Function with Docstring 。
- 将my_function重命名为update_high_scores并在( )中键入file_name , my_data 。
- 最后,将您的文档字符串更改为以下内容: """ Uses list of lists to write to new file """
To navigate the page using the TAB key, first press ESC to exit the code editor.