*** Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32. ***
*** Remote Python engine is active ***
import numpy as np
x=np.arange(6)
print(x)
type(x)
When run, the print command executes, but the type function command is silent. I tried with PyScripter and a dozen online interpreters, all ignored the type() command except one, Colab. Wonder if I can get a comment?
Have you tried print(type(x))? Let me explain you what’s happening.
On the Python REPL (called via python, without running files), and some other interpreters, whenever a function returns something (in this case the type of x), it will commonly print it: