Hi,
I have understood requirements completely that we need to convert prolog program to Python.
I have understood example that you provided and similarly I can convert whole program.
Please send me a message so that we can discuss more,
Thanks,
Swapnil Chouhan