Why do I only get an output?

I was writing codes in Jupyter Lab, and I thought there would be two outputs generated by the code. But in order to get two outputs, I must explicitly use print(). I am confused about it, can someone help me?

code :

import torch

a = torch.tensor([1, 2, 3])
a.dtype # print(a.dtype)

a = a.type(torch.int32)
a.dtype # print(a.dtype)

It is not some issue related to torch itself.
Maybe something like this might help (if you place it at the top of your notebook and execute it first)?

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

Thank you! It works!