Skip to content
Advertisement

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

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

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement