Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
I'm bamboozled...
Post Body

Hello everyone. I'm a rank beginner to python coding and I'm totally flummoxed with my issue. All my attempts to figure out a solution to my code have been dead ends so reddit is my last resort. I have a code that goes into a folder full of text files and edits all of them. The target text phrase (the one I want to edit) from text file to text file is not consistent. I am using a loop in attempting to change the text to this consistent result:

"FIRST INSTANCE,"

Throughout the texts the examples I am trying to replace look like this:

"FIRSTINSTANCE\n" - with no space "FIRST INSTANCE\n" - with one space "FIRST INSTANCE\n" - with two or more spaces

The first two examples change to exactly what I want them to change to. However, for some reason my target string (target = "FIRST INSTANCE\n") doesn't seem to find the text phrases with two spaces, so all the text files in the folder whose target phrase has two spaces or more remain unchanged. Why is this happening? What am I doing wrong? There are big gaps in my Python knowledge base as I am learning as I'm going along so please forgive me if there is a simple syntax solution to this. Thanks for taking the time to read this.

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
2,038
Link Karma
47
Comment Karma
1,991
Profile updated: 3 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago