-4

I was digging into python functions I would like help understanding what I found.

>>> help(len)

Help on built-in function len in module builtins:

len(obj, /)
    Return the number of items in a container.

I do not understand what the container would be. I used the following code.

>>> example = "art", "women",

>>> print(len(example))

2
John Kugelman
  • 349,597
  • 67
  • 533
  • 578

1 Answers1

0

Any container holding something.

>>> ex = [1,2,3]
>>> print(len(ex))
3
>>> ex2 = "a string"
>>> print(len(ex2))
8
>>> ex3 = {1,2,3,4}
>>> print(len(ex3))
4

array, string, list, ...

Kevin
  • 398
  • 2
  • 7