About 13,600,000 results
Open links in new tab
  1. Python len () Function - W3Schools

    Definition and Usage The len() function returns the number of items in an object. When the object is a string, the len() function returns the number of characters in the string.

  2. Using the len () Function in Python

    The len() function in Python returns the number of items in an object, such as strings, lists, or dictionaries. To get the length of a string in Python, you use len() with the string as an argument, like …

  3. Python len(): A Quick Guide to Counting Elements in Python

    Jun 23, 2025 · Learn how to use Python len () to count elements in strings, lists, and more. See examples, common errors, and how to use len () with custom classes.

  4. Python len () Function - GeeksforGeeks

    Jul 23, 2025 · The len () function in Python is used to get the number of items in an object. It is most commonly used with strings, lists, tuples, dictionaries and other iterable or container types.

  5. Python len () Function - Programiz

    In this tutorial, we will learn about the Python len () function with the help of examples.

  6. How to Use len () in Python | note.nkmk.me

    Jan 27, 2024 · In Python, the built-in len() function returns the length (the number of items) of objects of various types, such as lists and strings. Built-in Functions - len () — Python 3.12.1 documentation

  7. Python len Function - Complete Guide - ZetCode

    Apr 11, 2025 · Complete guide to Python's len function covering strings, lists, dictionaries, custom objects, and practical examples.

  8. Python List Length: A Beginner's Guide - PyTutorial

    Oct 23, 2025 · Master Python list lengths with our beginner's guide. Learn the len () function, its uses for loops, validation, and common pitfalls to write efficient code.

  9. Understanding the `len()` Function in Python - codegenes.net

    Nov 14, 2025 · The len() function in Python is used to return the length (the number of items) of an object. The object can be a sequence (such as strings, lists, tuples) or a collection (such as …

  10. Python len ()

    In this tutorial, you will learn how to use the Python len () function to get the number of items of an object.