
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
What is the maximum length of string in Python?
Maximum length of a string is platform dependent and depends upon address space and/or RAM. The maxsize constant defined in sys module returns 263-1 on 64 bit system.
>>> import sys >>> sys.maxsize 9223372036854775807
The largest positive integer supported by the platform's Py_ssize_t type, is the maximum size lists, strings, dicts, and many other containers can have.
- Related Articles
- Python – Sort Matrix by Maximum String Length
- What is the max length of a Python string?
- What is the maximum length of MySQL VARCHAR column?
- What is the maximum length of a table name in MySQL?
- What is the maximum length of each type of identifier in MySQL?
- Write a program in Python to find the maximum length of a string in a given Series
- Maximum length of consecutive 1’s in a binary string in Python using Map function
- Maximum even length sub-string that is permutation of a palindrome in C++
- What is the maximum value of float in Python?
- What is the maximum size of list in Python?
- Program to find maximum length of k ribbons of same length in Python
- Maximum Length of a Concatenated String with Unique Characters in C++
- Find maximum length Snake sequence in Python
- Maximum length of balanced string after swapping and removal of characters in C++
- How to get the length of a string in Python?

Advertisements