Is there a way to measure cell line similarity using python? I have a list of cell lines that should be compared against another list of cell lines as pairs. I am trying to find a way in order for me to compare two cells such as MCF7    and 10964c cell lines. I am using python so, can anyone provide some steps so that I can do the comparison. 

I also have their ontologies in an OBO format as I need them to do the comparison. if there is a library or a certain procedure that can solve this problem will be a great help.

Edit:

The comparison I'm trying to do is to measure the similarity in different ways, there are many measurement methods such as the distance in the ontological hierarchy between two cells by calculating the shortest path. You can also measure the number of common ancestors. But also, there are libraries that perform complicated (and more accurate) similarity measurements like JiangConrath, Jaccard, or Resnik which is popular. The problem with theses libraries is that they are not oriented to calculate cell line ontologies and may arequire annotation corpus for some similarity measures.
At its current form, your question is not clear, for example which aspects of these cell lines are your trying to compare?

Regarding your point on the ontologies, in Python you can use the pronto library to work with ontologies in OBO format.