Python Forum
Cannot Remove the Double Quotes on a Certain Word (String) Python BeautifulSoup
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot Remove the Double Quotes on a Certain Word (String) Python BeautifulSoup
#3
(Oct-22-2019, 01:43 PM)soothsayerpg Wrote: I've been in weeks trying to remove a double-quote (") from a word (as I want to count the word in a certain text or webpage and what not).

There would be words like:
“Stay with Me” and “I’m not the Only One”,
"Latch"
[ ... ]

I cannot remove those double-quotes. Tried .replace, .strip, even if I .split them up or turn them into a list. I can remove other special characters like punctuation, apostrophe, period, etc. etc.... but never the double-quotes.

Hi!

It's just a thought, but I think that maybe it's because you are using different types of double quotes, and probably eliminating just one type of them.

The double quotes in “Stay with Me” are, for instance, different from the double quotes in "Latch".

All the best,
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply


Messages In This Thread
RE: Cannot Remove the Double Quotes on a Certain Word (String) Python BeautifulSoup - by newbieAuggie2019 - Oct-22-2019, 02:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  remove gilberishs from a "string" kucingkembar 2 298 Mar-15-2024, 08:51 AM
Last Post: kucingkembar
  Retrieve word from string knob 4 527 Jan-22-2024, 06:40 PM
Last Post: Pedroski55
  extract substring from a string before a word !! evilcode1 3 572 Nov-08-2023, 12:18 AM
Last Post: evilcode1
  Need help on how to include single quotes on data of variable string hani_hms 5 2,111 Jan-10-2023, 11:26 AM
Last Post: codinglearner
Smile please help me remove error for string.strip() jamie_01 3 1,239 Oct-14-2022, 07:48 AM
Last Post: Pedroski55
  [SOLVED] [BeautifulSoup] Why does it turn inserted string's brackets into </>? Winfried 0 1,551 Sep-03-2022, 11:21 PM
Last Post: Winfried
  [SOLVED] [BeautifulSoup] Turn select() into comma-separated string? Winfried 0 1,132 Aug-19-2022, 08:07 PM
Last Post: Winfried
  Remove a space between a string and variable in print sie 5 1,839 Jul-27-2022, 02:36 PM
Last Post: deanhystad
  Inserting line feeds and comments into a beautifulsoup string arbiel 1 1,212 Jul-20-2022, 09:05 AM
Last Post: arbiel
  How do I remove spurious "." from a string? Zuhan 7 2,098 Apr-12-2022, 02:06 PM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020