首页 > 解决方案 > 如何在 IPython 魔术命令后添加评论

问题描述

如何在IPython 魔术命令的末尾添加评论?

例如,尝试使用%cd

%cd "dir"  # comment

我想更改目录dir,但我得到:

[Errno 2] No such file or directory: 'dir # comment'

标签: jupyter-notebookipythonipython-magic

解决方案


推荐阅读