3👍
✅
Use %%
in format string to get %
symbol
'&p=myvar%%3D%s' % 'value'
I hope I understand you.
Also you can use urllib.urlencode
>>>urllib.urlencode({'i':'fundedbyme', 'p':'myvar=%s' % myvalue})
'i=fundedbyme&p=myvar%3Dmyvalue'
Source:stackexchange.com