I want to search through a text file and output substrings that match the user input, but when my program searches each line I want it to only search the characters between the "|" character and the end of the line. But I keep getting the following error:
-
You should use a context manager to handle files. Are you using Python 2?AMC– AMC2020-01-29 05:32:49 +00:00Commented Jan 29, 2020 at 5:32
-
Does this answer your question? Why am I seeing "TypeError: string indices must be integers"?AMC– AMC2020-01-29 05:33:27 +00:00Commented Jan 29, 2020 at 5:33
Add a comment
|