How To: Insert a quotation mark into a label expression using Python
The label expression dialog in ArcMap does not respect the exact standards of Python syntax. When trying to insert a quotation mark (") using an escape character, (for example "\""), an invalid expression error is returned. To get around this limitation and insert a quotation mark into a label, perform the following procedure.
Use the Unicode character '\x22' in place of the quotation mark, as shown in the following two examples:
Simple label expression:
[Label] + '\x22'
Advanced label expression:
def FindLabel ( [Label] ):
return [Label] + '\x22'