It is not supposed to show any output.
As you can guess, a program does not display all intermediation calculation it does. Only those we wanted it to print.
If you want to show the length, you must type
(show on the console the value of len(names))
Other wise, len(names) is just a value. There are plenty of things you may want to do with a value. Printing is just one of them.
I guess that the reason of the misunderstanding is the fact that you are used to type python code in the interactive console.
But that is a specific behavior of interactive console of python.
For obvious practical reasons (when you type a value in an interative console, it is usually because you want to know that value. It would be painful to force interactive user to type print(...) at each line. 99% of the lines they would type would contain the "print" anyway).
So interactive python print every value.
But as a language interpretor (with files containing source code), python, like other languages print only what it is told to print
Same goes with JS for example. If a webpage contain a line of JS that is a value - which is the case of everything in JS - it does not trigger a display in the console.
For example, x=2, in JS, has a value (contrary to python. In which x=2 only has an effect: in changes the value of x. But in JS, x=2 has both an effect and a value. Which allows to write y=x=2).
When you have a line in a webpage script "x=2", it does not display "2" in the console.
But if you open the JS console of your browser, and type x=2 in it, the response is "2".
Lot of interpretor behaves like that: values are all printed in interactive mode, but not in normal mode.