Syntax
Python Length of a Sequence Syntax
In Python, length of a sequence: returns the number of items — len(items)
Quick Answer
- Syntax
len(items)
PythonSyntax
Length of a Sequence
Returns the number of items.
How to length of a sequence in Python
- Open your Python file or editor.
- Copy the example, then replace its sample names and values for your code.
Python Length of a Sequence Syntax
Use len(items).
Related Syntax References
Frequently asked questions
What is the Python syntax for length of a sequence?
Use this pattern: len(items)
Can I copy this Python code example?
Yes. Use Copy code and adapt the example to your program.
Is this Python syntax different on Mac or Windows?
No. The language syntax is the same across operating systems.
Official source · How we verify