I typed exactly what’s in the book but i’m still getting that error from ex39.
Check the line above too. Did you start the dictionary off with { character? Sometimes the point of the error is the impact of the error not the actual fault.
If you post up the entire code here we might be able to help, or you may spot the error when it’s in a slightly different format. If all else fails, delete the file and start again, it’s a good cure for hidden syntax errors that you cannot see (until someone points them out).
1 Like
Got it! I initially used [ ] which brought about the error, using { } worked instead. Thanks
1 Like