Create Java Script ported to Python