Searching inside with a group of tuples inside a list
<p>I need help with a specific function that I need to write in Python:</p>

<p>I have a List that contains a group of Tuples each containing 4 sets of meaningful information, this function is meant to find a String inside one of the tuples and then return the the rest of the tuple(or in the test's case, True) or if the string is not found in the tuples it will just return False.</p>

<p>The string in question is meant to be input at the start, as well as the list(or a variable assigned to that list) I have tried to iterate over the list but it just seems to return either True or False every time depending on how I write the iteration. It also seems to be impossible to use:</p>

<p>if string in list:
return true</p>

<p>Would anyone have any solutions to this? its really boggling my mind.</p>

<p>Edit: Sorry, i'll add the code I have so far; it really isn't anything because I haven't done much</p>

<pre><code>def search_info(string, list1):
list1 = [('Donut', '320', '4.00'), ('Apple Pie', '200', '3.20')]
    for c in ennumerate(list1):
        if name in c:
            return True
        else:
            return False
</code></pre>

<p>I know this is no-where near but I keep running into dead ends</p>
