Oct-27-2019, 09:53 AM
(This post was last modified: Oct-27-2019, 09:53 AM by newbieAuggie2019.)
(Oct-27-2019, 08:31 AM)soothsayerpg Wrote: Did you tried it out? If you try it out and remove all the special chars, that double-quote is the one who'll remain.
string1 = """There would be words like: “Stay with Me” and “I’m not the Only One”, "Latch" “The Thrill of It All” “Oh! Carol” etc. etc. ...""" print(''.join(characters for characters in string1 if characters not in '"“”'))Output:
Output:There would be words like:
Stay with Me and I’m not the Only One,
Latch
The Thrill of It All
Oh! Carol
etc. etc. ...
>>>
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
"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