The notebook distinguishes to two different navigation modes:
Command mode: cursor keys can be used to move the highlighted cell. Press enter to move from Command mode to Edit mode.
In edit mode, the content of a cell can be changed. To complete editing the cell, press SHIFT+RETURN to execute the cell or ESCAPE to go back to Command mode.
We recommend taking a tour of the notebook at some point (Help -> User Interface tour), and to explore the available short cuts (Help -> Keyboard Shortcuts).
In [1]:
a = [10, 20, 30] # create an example object
The standard method to display an object to standard output (that's normally the screen), is the print command:
In [2]:
print(a)
Within the notebook, the object or value of the last line is displayed:
In [3]:
a
Out[3]:
In [4]:
a
b = 10
In [5]:
a
b
Out[5]:
To display multiple values within one cell, we need to use the print function:
In [6]:
print(a)
print(b)
If we want to supress output of the value/object of the last line, we can add ;:
In [7]:
a;
In [8]:
a
Out[8]:
All cells in a notebook, or a subset (above or below the current cell) can be executed via the Cell menu.
A useful command is Kernel -> Restart & Run all which
This is useful to
Notebooks can be exported to other file formats via the File -> Download as menu.