How to go back after entering a code

i want to start coding as a side skill i could practice right now i dont have a clue about what it is or how it works i downloaded python 3.11 and whenever i start a new line with the 3 >>> in from of it it doesnt let me return to the previous line to edit the content or code in it is there something i did wrong?

It looks like you are doing it in the command line interface, which is normal for the command line interface. If you want to go back and change your previous code, you should edit it in a text editor or a specialized text editor like Code, Vim, Jupyter, etc.

1 Like

Continuing the discussion from How to go back after entering a code:

Oh do i have to download some kind of separate file for that??
as i mentioned above i have 0 clue of anything right now just trying to get the basics of it

(right now im using chatgpt to get to know as much as i can about the basics)

Actually, you don’t need that. But if you would like to have it more comfortable in the future it would be a good idea (Code or Jupyter looks to me easy to jump in). At the moment you can prepare your code and test it out in the text editor (e.g. Notepad in Windows, or Pluma in Linux). You just place this in the first line if you are on Mac or Linux (in Windows its not needed at all):

#!/usr/bin/env python

Then save your file as a *.py file and run it to test it. But for me, this would be too time-consuming, so I would better download that specialized editor, which lets you experiment faster.

I see… That makes sense thanks a bunch ill download it and test it out ill go with the jupiter 1 for now and test it out thanks again

Yes, I don’t personally use Jupyter, but have seen some vids on YouTube and it looks good. For example this guy is using Jupyter.

Alright Thanks ill give the video a watch also idk how u changed the link to “this guy is using Jupyter” but thats cool

1 Like

Please don’t do this. Instead, read through the tutorial that is built into the official documentation. There are at least two problems, if you’ve just started out, with trying to learn from ChatGPT:

  1. ChatGPT does not know or understand anything about what it is talking about. It is merely creating this impression by stringing the right words together, based on a very complex model of what words statistically follow each other in what order. But it is not applying any reasoning that is based on the actual meaning of the words - only on their apparent structural relationships in a huge amount of English text that it processed.

  2. If you are truly starting from zero, you should not expect to know what questions are important to ask. Qualified instructors have the benefit of hindsight and experience. A properly written tutorial is at least based on what experts have heard beginners ask before, and what they’ve seen to cause confusion, etc.

1 Like