I have a string that contains 10 million characters. The string is formatted as:
"0000001 : some hexadecimal text ... \n 0000002 : some hexadecimal text ... \n 0000003 : some hexadecimal text ... \n ... 0100000 : some hexadecimal text ... \n 0100001 : some hexadecimal text ... \n" and I need the string to look like: "some hexadecimal text ... \n some hexadecimal text ... \n some hexadecimal text ... \n ... some hexadecimal text ... \n some hexadecimal text ... \n" I can split the string at the ":" then iterate through the list removing the first 8 characters then convert back to a string. This method works, but it takes too long to execute. Any tricks to remove the first n characters of each line in a string faster? Thanks, Bruce -- https://mail.python.org/mailman/listinfo/python-list