pretty cool java script to python!