I have 2 lists.
list 1 (list) - list containing descriptive text list 2 (list) - text entered by user
I am trying to write some code at Python and I want to check if words from a list of words contain in a list 1
except searching words in text, I need to count numbers of IDs and print result.
I’m new to this and I couldn’t find anything on Google that could help me.
list = [['ID127', 'Along with their associated islands, they cover 8% of Earth's total surface area and 28.4% of its land area', 'Europe', 'Germany'], ['ID128', 'The first university east of France and north of the Alps was the сharles university in Prague established in 1347', 'Europe', 'Hungary'], ['ID129', 'The сentral European university (CEU) is a graduate-level', 'United States', 'Canada']] text entered by user = ['area' 'university' 'сentral']
the result of the program: the word found in the text, the number of ID, region, state
program result = [area, 1, 'Europe', 'Germany'] , [university, 2, 'Europe', 'Hungary'] , [university, 2, 'United States', 'Canada'], [сentral, 2, 'United States', 'Canada']