Wolfram Computation Meets Knowledge

The Wolfram Language:
Fast Introduction for Programmers

Show additional notes for:
All sections 
Get Started

Managing Sessions

Notes for Java programmers:

Unlike the Wolfram Language, Java is a compiled language and does not allow the kind of interactive coding and testing described here.

% stands for the most recent result; %n stands for the result Out[n].

Notes for Python programmers:

Using % in the Python interactive shell serves a similar role as _ in the Wolfram Language, except you cannot specify exact line numbers with the default Python shell.

Use CMD+L to copy down the most recent input to the current input.


End a line with ; to make it print no output:

In[1]:=1
t=Sunset[];

Notes for Python programmers:

In addition to terminating lines, semicolons in the Wolfram Language suppress output display.


% still works:

In[2]:=2
%
Out[2]=2

Use Short to get a short summary of output:

In[1]:=1
Short[Range[1000]]
Out[1]=1

Use //function to apply a function at the end:

In[2]:=2
Range[1000]//Short
Out[2]=2

If you need to abort a computation, choose the Abort Evaluation menu item, or press CMD+. (Mac) or ALT+. (other).


© 2017 Wolfram. All rights reserved.