2 ms·
It works just like \ in standard unix parsing - you escape the escape character by doubling it. So in "%%%s": "%%" -> "%" "%s" -> "foo" for a result of "%
by lacker 18y ago
It works just like \ in standard unix parsing - you escape the escape character by doubling it. So in "%%%s":
"%%" -> "%"
"%s" -> "foo"
for a result of "%foo".
- witten 18y agoRight, but the escaping by doubling does not work in Python unless it's in a format string. So "%%foo" does not count as escaped. That's what threw me off.