Java to Python