3 ms·Len() and str() are a loop under the hood.by _xnmw 2y agoLen() and str() are a loop under the hood.emidln 2y agolen() is an O(1) lookup of the stored length on the unicode/bytes object in Python.