I have a simple Python code written in VS code to print an array:
import numpy as np # Importing the NumPy library
# Creating a 1D array
array_1d = np.array([1, 2, 3, 4, 5])
print("1D Array:",array_1d)
The output appears in Python terminal window as follows:
Now I am trying to extract this variable "array_1d" directly in terminal window (IDE shell), but I get an array as such:
How do I get this variable in the IDE shell of VS code?
Note: This problem does not happen with default IDLE shell of Python. How do I see this in VS code.
Try hitting shift + return after highlighting the code to Run Selection/Line in Python REPL
or alternatively use the right click menu: