Javascript Map Function Object Is Not Iterable Python