I have two XML files, The first XML file include list of items. The second XML file include list of review details. I need to find if review exists in the item list. For the mission I have a for loop that run on all of the items and for etch item check with another for loop if it exists in the review list (The second XML). Because this XML contain lo.ts of data its take a lot of time The question is if there another way to achieve this with more efficiency.
example:
for x in price.iter('Item'): # First XML with the items
for z in promo.iter('Review'): # Second XML with the reviews
if z.find('ItemCode').text == x.find('ItemCode').text:
print True # Find the data in the review