Anil wrote:

> Could you please tell me how to achieve the below.
> I am interested in  getting the output like:
> 
> ABC
> EFGA   --> child of ABC
> ABDG   --> child of AEFGA
> MON   --> child of ABC
> A1
>      FGA   --> child of A1
>      BG    --> child of FGA

print """
ABC
EFGA   --> child of ABC
ABDG   --> child of AEFGA
MON   --> child of ABC
A1
     FGA   --> child of A1
     BG    --> child of FGA
"""

Unless you don't tell us what _input_ shall be processed to yield that
output, I doubt anybody can be of more help....

-- 
Regards,

Diez B. Roggisch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to