

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get the length of a string in Python?
Python has a method called len() that gives us the length of any composite object. To get the length of a string, just pass the string to the len() call. For example,
print(len('abcdefghijklmnopqrstuvwxyz'))
OUTPUT
26
- Related Questions & Answers
- How to get the Length of a String in Java?
- How to get the length of a string in JavaScript?
- How to get the length of longest string in a PHP array
- How to get length of a list of lists in Python?
- How to get the size of a string in Python?
- How to get the length of a Number in JavaScript?
- Python Pandas - Get the length of the Interval
- What is the max length of a Python string?
- Python - Find the length of the last word in a string
- How do I get the average string length in MySQL?
- Return the length of a string array element-wise in Python
- What is the maximum length of string in Python?
- Find length of a string in python (3 ways)
- PHP – Get the string length using mb_strlen()
- How to get the length of an object in JavaScript?
Advertisements