python code part