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

    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

    Nov 16, 2024 · The len() function in Python is a built-in function that returns the length of an object. It provides the number of items in a container, including sequences like strings, lists, …

  3. Python len() Function - GeeksforGeeks

    Apr 15, 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 …

  4. Python len()

    The following example shows how to use the len() function to get the length of a string, the number of elements in a tuple, and the number of items in a range: s = 'Python' print(len(s)) # 👉 …

  5. Python len() Function - Programiz

    The len() function returns the length (the number of items) of an object. Example languages = ['Python', 'Java', 'JavaScript'] length = len(languages) print(length) # Output: 3

  6. len() in Python - Built-In Functions with Examples - Dive Into Python

    The len() function in Python is a built-in function that returns the number of items in a container, such as a string, list, tuple, dictionary, etc. It calculates the length of the object and is …

  7. Python len() Function - Online Tutorials Library

    Python len() Function - Learn how to use the len() function in Python to determine the length of strings, lists, and other collections. Discover examples and best practices.

  8. Mastering Python len() Function [In-Depth Tutorial] - GoLinuxCloud

    Jan 9, 2024 · The len() function in Python is a built-in function that returns the number of items in an object. It's one of the simplest and most frequently used functions in Python for determining …

  9. Len () Function in Python - pybeginners.com

    Jan 5, 2025 · The len() function in Python is used to quickly determine the length or the number of items in a collection, such as a string, list, tuple, dictionary, or any other iterable object. It …

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

    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. For more details, including handling two …

  11. Some results have been removed