Ask Your Question

how to kill a variable

asked 2016-09-19 10:02:01 +0200

Sha gravatar image

Earlier I have defined on my Sage that variable f equals to some expression. Later on I no longer need f to be that expression. I just need it to be a variable. I know in PARI we have the function kill(f). I tried that on Sage but it did not work. Can I kill a variable that I have defined earlier on Sage.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-19 10:31:20 +0200

daniele gravatar image

updated 2016-09-20 08:49:30 +0200

Use "reset" command:


Related question: "How can I clear an assignment to a variable?"

edit flag offensive delete link more



Need quotes around variable name: reset('f')

paulmasson gravatar imagepaulmasson ( 2016-09-19 22:46:59 +0200 )edit

Thank you so much. It worked!

Sha gravatar imageSha ( 2016-09-20 01:45:46 +0200 )edit

@paulmasson: thanks, corrected!

daniele gravatar imagedaniele ( 2016-09-20 08:49:21 +0200 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-09-19 10:02:01 +0200

Seen: 451 times

Last updated: Sep 20 '16

Related questions