Jupyter Notebook-写入文件产生语法错误

时间:2018-12-05 14:03:29

标签: file

# 2 players play Tic Tac Toe
# board drawn with ascii
# positions on board chosen with numpad

%%writefile boardfile.txt
__|__|__
__|__|__
  |  |  

boardfile = open('boardfile.txt', 'w+')

这会产生指向“ %%”部分的“语法错误”。当我在下一个单元格中运行等效的测试代码时,它可以正常运行...?

0 个答案:

没有答案