A notebook cell is a discrete unit for either formatted text or executable code. Text cells use Markdown; code cells contain Python and display execution output below. section 2.3 section 2.6
Use the two cell types differently:
- Edit a text cell, then save or select it to return to formatted display. section 2.3
- Run a code cell with Ctrl-Enter, its run control, or the context menu; output appears immediately below. section 2.3
- Inspect errors beneath the code cell, including the reported line, caret location, and Python error message. section 2.3.2
A code cell and its output
Enter print("Hello, World") in a code cell and run it. The output Hello, World appears below the cell, separate from the entered code. section 2.3.1
print("Hello, World") #1
Hello, World #2
#1 Code entered in code cell
#2 Output from running code, below code cell
Browse the compact listing showing code entered in a cell and the output produced beneath it. section 2.3.1
