len() function doesn’t implement any result in Sublime text3
Function issues
Didier
#3
i just tested the function simply
test = [‘a’, ‘b’, ‘c’, ‘d’]
len(test)
and no output
0 Likes
OdatNurd
#4
Unless you’re running your code in a Python REPL, you only get output that you ask for. Saving and running a Python file does not use the REPL.
A statement like len(test) calculates the length of test, but that’s all. If you want to see the result, print(len(test)) calculates the length of test, and then displays it.
This isn’t specific to Sublime Text at all, it’s how Python works.
1 Like