The difference is that json.dumps applies some minor pretty-printing by default but JSON.stringify does not.
To remove all whitespace, like JSON.stringify, you need to specify the separators.
json_mylist = json.dumps(mylist, separators=(',', ':'))