I just cannot to format of a string:
id = "3123123"
a = '{"classes": [], "field": {}}'.format(id)
print(a)
All suggestions will be nice !
I just cannot to format of a string:
id = "3123123"
a = '{"classes": [], "field": {}}'.format(id)
print(a)
All suggestions will be nice !
Your formatting string clashes with the formatting placeholder specifier
You'll need to escape the {
with {{
a = '{{"classes": [], "field": {{}}}}'.format(id)
And a make sure there is a placeholder for id
in the formatting string with {}