I am doing a Python task and I am trying to compare two lines of code and check a certain sub-string on both lines.
Let us have for example: I am reading two files that have these lines
<Field Name="t" Description=" "/> First file
<Field Name="ta" Description="description1"/> Second file
What I am trying to accomplish is to compare if there is difference between those two descriptions.
I have tried using functions like any or next but they return booleans and they check difference for the whole lines,where as here , I need only to check the type of substring I want to search for.
Important part to mention is that I am not using regular split or other functions to define a start index and end index, and how many characters I want. I have a list of includes that has the current values:
matches=['Description="',etc]
Also I CAN have differences in other parts of the string such as Field Name="something" , like how in the above example those 2 files have different field names, but we only care about the description.
And now for the question. Is it possible to use that list element to look for that substring in both lines of the two files, and check if they are different or not? I need to check only for the specific matches I have in this matches list.