How do I get next element from list after search string match in python
<p>Hi Friends I have a list where I'm searching for string and along with searched string I want to get next element of list item. Below is sample code</p>

<pre><code>&gt;&gt;&gt; contents = ['apple','fruit','vegi','leafy']
&gt;&gt;&gt; info = [data for data in contents if 'fruit' in data]
&gt;&gt;&gt; print(info)
['fruit']
</code></pre>

<p>I want to have output as
fruit
vegi</p>