Can anyone tell me how can I get the length of a string without using the len() function or any string methods. Please anyone tell me as I\'m tapping my head ma
len()
Make a file-like object from the string, read the entire object, then tell your offset:
>>> import StringIO >>> ss = StringIO.StringIO("ABCDEFGHIJ") >>> ss.read() 'ABCDEFGHIJ' >>> ss.tell() 10