79585151

Date: 2025-04-21 19:01:09
Score: 1
Natty:
Report link

As you can see:

SyntaxError: invalid syntax

id_count += 1 is a statement which a python dictionary does not allow. Like furas mentioned, try using this:

"id": id_count + 1

Another way to solve this is to look at this other question similar to yours about why Python doesn't dictionaries support operators such as +, +=, etc.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: rysch