Python Forum
Escape Single quotation between each content tag
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Escape Single quotation between each content tag
#1
Hello All,

I am trying to escape a Quotation between content tag of this string

"[[('name', 'productname_0'), ('type', 'html'),('content', 'O'Cornor')],[('name', 'productname_1'), ('type', 'html'), ('content', 'Philp's')]]"


Previously I had this string
"[[('name', 'productname_0'), ('type', 'html'),('content', 'A Cool Shirt')],[('name', 'productname_1'), ('type', 'html'), ('content', 'A Cool Shirt')]]" 
Its working fine. But When I added Single Quotation inside quotation 'O'Cornor'
Example : ('content', 'O'Cornor')

Its giving me syntax error issue. How Can I escape Single Quotation between content value only

*content is Key
* O'Cornor is value between single quotation
Reply


Messages In This Thread
Escape Single quotation between each content tag - by usman - May-01-2021, 06:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  use of escape character in re.sub and find WJSwan 1 910 Feb-16-2023, 05:19 PM
Last Post: Larz60+
  Escape indentation Frankduc 11 3,077 Jan-31-2022, 02:41 PM
Last Post: Frankduc
  add Escape charcters in string GrahamL 3 1,168 Jan-20-2022, 01:15 PM
Last Post: GrahamL
  DIY Escape Room for fun StannemanPython 1 2,311 Feb-17-2021, 10:53 PM
Last Post: maurom82
  Something wrong with the quotation mark in dictionary definition Mark17 1 1,999 Jan-29-2021, 03:34 PM
Last Post: buran
  How to escape OrderedDict as an argument? Mark17 2 2,027 Dec-23-2020, 06:47 PM
Last Post: Mark17
  How to instantly add quotation marks and comma for parameters? cheers100 4 8,070 Oct-22-2020, 12:51 PM
Last Post: cheers100
  help for escape sequences NewPi 1 2,031 Dec-11-2019, 11:22 PM
Last Post: ichabod801
  What is the correct syntax for list items that need to contain a quotation mark, etc? KaisoArt 7 3,496 Sep-14-2019, 05:26 AM
Last Post: buran
  escape single quote deep_logic 1 1,803 Sep-10-2019, 08:05 PM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

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