在 vscode jupyter notebook 输出中显示问题/输入 [英] Show question/input in vscode jupyter notebook output

查看:68
本文介绍了在 vscode jupyter notebook 输出中显示问题/输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 vscode jupyter notebook 时,有没有办法在单元格输出中显示输入问题?当我使用 Google Colab 时,单元格输出中有问题.我想知道如何在不使用 print() 的情况下显示问题.

在谷歌 Colab 中:

如果想在同一个地方显示输入和输出,建议使用python文件,终端会依次显示输入和输出内容.

Is there any way to show input question in cell output while using vscode jupyter notebook? When I use Google Colab, there are question in the cell output. I want to know how to show question without using print().

In google Colab: https://i.stack.imgur.com/L71OS.png

In vsCode: https://i.stack.imgur.com/4szQJ.png

解决方案

At present, the Jupyter function in VSCode is provided by Python extension. The bottom of each cell is used to display output. Therefore, the input it receives is provided by the input box above, which is its display input mode.

If you want to display input and output in the same place, it is recommended that you use a python file, and the terminal will display the input and output content in turn.

这篇关于在 vscode jupyter notebook 输出中显示问题/输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆