3 ms·len() is an O(1) lookup of the stored length on the unicode/bytes object in Python.by emidln 2y agolen() is an O(1) lookup of the stored length on the unicode/bytes object in Python.