Since im new with python (learning now) i got idea to make function which tells how far the descendant is from the given person. I mean like that, you have family tree and script (checkif(person, descendant)) check if descendant is same person than it returns 0. If the descendant is the child of a person, it returns 1. If (s)he's a grandchild, it returns 2. If (s)he's a grandgrandchild, it returns 3 How do i made this? Here is example of family tree that i made (names are in slovenian language) in brackets is age of person: Contact me for more: Skype - deenq15