arrays using python
<p>I have 2 arrays. query_array and stem_array.
stem_array has elements in format (word | synonyms). the query_array has words in it.</p>

<p>I want to check if the query_array has words that are contained in the synonyms part of the stem_array and if yes, then map the synonym to the actual word.</p>

<p>for eg: query_array (presidential, authenticity) 
stem_array (president | presidential , authentic | authenticity, authentication)
so my final array should return (president and authentic).</p>

<p>please help me as i am new to python and i have a project to complete.</p>

<p>thanks.</p>
