Fix Python – How can I selectively escape percent (%) in Python strings?

I have the following code
test = “have it break.”
selectiveEscape = “Print percent % in sentence and not %s” % test

print(selectiveEscape)

I would like to get the output:
Print percent % in sentence and not have it break.

What actually happens:
selectiveEscape = “Use percent % in sentence and not %s” % test
TypeError: %d format: a number is….

Fix Python – Saving utf-8 texts with json.dumps as UTF8, not as \u escape sequence

Sample code:
>>> import json
>>> json_string = json.dumps(“ברי צקלה”)
>>> print(json_string)
“\u05d1\u05e8\u05d9 \u05e6\u05e7\u05dc\u05d4”

The problem: it’s not human readable. My (smart) users want to verify or even edit text files with JSON dumps (and I’d rather not use XML).
Is there a way to serialize objects into UTF-8 JSON strings (instead ….