Last Updated 09/03/2020

Sage Essentials
Section 1: Numerical Calculations

Clearing Variables

Example 3 Clearing all variables at once: the reset() command

The reset() command can also clear Sage's memory of all definitions that you have made. It is like starting a new Sage session. If you are starting a completely new problem you can use the reset() command to guarantee that there are no leftover definitions from your earlier work.

Since the name y has not been defined in anyway after the reset, Sage echoes with an error.


← Previous Example Next Example →