Why to use len(example_tensor.shape) to get the rank?

can’t we just use len(example_tensor) to get the rank?
This is in the optional lab on PyTorch.

Try it and watch what happens. You get a different answer, right? The length of a tensor is different than the rank. The shape is a “tuple” that has as many elements as there are dimensions in the tensor. What is the definition of rank again (he asked rhetorically)? :nerd_face: