How can i undone a code line

How can i undone a code line which i mistakenly given an input then output because i don’t wanna write the whole code from the start. Can someone guide me to it cuz i’m new to python and this whole coding. i’d really appreciate.

Maybe if you haven’t closed the tab, you can press Ctrl + Z.

If this doesn’t do the job, you can also try repl history. You can access this by pressing the ‘history’ button at the bottom right of the file editor section.

Then you can drag the slider backwards to the point where your desired code was/is and press ‘restore to here’.