0
python why is this code non-Json serializable?? it works on solo learn but is raising the Json error on the proctor site.
6 Respostas
0
... Your question does not match your code.
Nonetheless I shall try to entertain you.
Python dictionary string representation happens to be in JSON. You don't need to serialize it. If you are talking about the intended result the function, the test value you gave it doesnt pass the validation you made so I cant see what is wrong with the dictionary it is supposed to return.
0
Gershon I don't get you. I pasted the code on solo learn and maybe that is why the indents may have a problem. It is very stressful editing on solo learn but I once did that and it worked. when I transfered my working solution to the proctor, it was still rejected. I repasted that solution back on solo learn and the indents scattered up again. my issue is this:
what should I change to avoid a Json error.
for n in d.keys:
d[n]= xyz
result={}
result[n]=d[n]
print( result)
I want to know if this is where the problem is and if I can change the method I am using to access the dictionary values.
0
ok could u send it by email
gfosu1997@gmail.com
0
ok bro. thanks
0
you can check your mail now.