java code and python code