In Python, you can use "" (triple quotation marks) to embed long lines of text data in your program.
In your case, however, do not waste time on this.
If you have an object that you pickled, you would have been much, much happier dumping that object as a Python source and just turning on the source.
The repr function, which applies to most objects, returns the original version of the Python object. If you implement __repr__ for all your custom classes, you can trivially reset your structure as a Python source.
If, on the other hand, your pickled structure started as Python code, just leave it as Python code.
source share