Home > Mobile >  When I write python code in terminal it only prints older version of the file (VScode)
When I write python code in terminal it only prints older version of the file (VScode)

Time:07-27

Just recently got into python and I'm having trouble understanding what's going on. When I write print("hello world"), I input python3 name.py in the terminal and it prints.

However when I change the str to (e.g.) "bye", and input the same thing in the terminal, it still prints hello world. Why isn't it updating? Thanks

CodePudding user response:

After you modify the code, you can use "ctrl s" to save it.

If you don't save it, run the file directly and it will run the content before the change.

  • Related