About 2,050,000 results
Open links in new tab
  1. Python String Length - W3Schools

    Example Get your own Python Server The len() function returns the length of a string:

  2. How to get the size (length) of a string in Python

    Aug 31, 2023 · Do you want to find the length of the string in the Python language? If you want to find the length of the word, you can use the len function. string = input("Enter the string: ") …

  3. Find Length of String in Python - GeeksforGeeks

    Dec 3, 2024 · In this article, we will learn how to find length of a string. Using the built-in function len () is the most efficient method. It returns the number of items in a container.

  4. How To Get The Length Of A String In Python?

    Feb 24, 2025 · In this article, I explored g four different methods to get the length of a string in Python, such as using len() function, Iterating with a for loop and the in operator, combining …

  5. Python Program to Calculate length of a String - BeginnersBook

    Apr 6, 2018 · Python program to calculate length of a String without using len () function. First we will see how to find the length of string without using library function len (). Here we are taking …

  6. How To Get The Length Of A String In Python (5 Ways)

    The correct function to use for finding the length of a string (or any iterable object) in Python is len (). If you try to use size () to find the length of a string in Python.

  7. How to Find the Length of a String in Python - CodeRivers

    Apr 10, 2025 · The most straightforward and commonly used way to find the length of a string in Python is by using the built-in len() function. The len() function takes an iterable (such as a …

  8. Find Length Of A String In Python | 10 Ways With Code Examples

    Learn how to find the length of a string in Python using 10 methods, including the common len (). Code examples and tips for handling edge cases included.

  9. Python: Calculate the length of a string - w3resource

    Apr 19, 2025 · Write a Python program to compute the length of a string using a for-loop that increments a counter for each character. Write a Python program to use list comprehension …

  10. Python Program to Find the Length of String

    Feb 20, 2023 · The most common and straightforward method to find the length of a string in Python is by using the built-in len () function. For example, len ("Hello, World!") will return 13, …

  11. Some results have been removed