Ask Your Question

Hide the Output

asked 2011-01-14 06:29:45 -0600

stanislav gravatar image

I have just an other question.

Is it possible to hide the output from an expression especially in notebook mode? The ";" does not working, as I have seen.

Is there a way to do so?


edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2011-01-14 14:27:22 -0600

Felix Lawrence gravatar image

This question was also asked here. The answer is to use assignment:

sage: 1+1
sage: a = 1+1
sage: _ = 1+1

The last example is probably the best one to use most of the time, since "_" generally represents the result of the last evaluation (like the ANS button on a calculator). So if you assign to "_", then you're not "wasting" a variable. You'll see this trick used a lot in Sage's documentation.

edit flag offensive delete link more

answered 2011-01-15 00:44:57 -0600

stanislav gravatar image

Thank you for quick response. I will use the assignment to the _ variable.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-01-14 06:29:45 -0600

Seen: 1,086 times

Last updated: Jan 15 '11