make a python version of f