title: Need help to figure out how to update a key.value in some list of python dictionaries
body: <p>Hi guys I have this data:</p>
  
  <pre><code>members = [{'n1': 1, 'active': True, 'ticket': 10, },
               {'n2': 2, 'active': False, 'ticket': 0, },
               {'n3': 3, 'active': True, 'ticket': 12, }]
  </code></pre>
  
  <p>I need to update the members time to time, to check if they are active or not, and give new tickets to active members and maybe filtering the inactive ones.</p>
  
  <p>For checking actives or inactive I can use some like this:  </p>
  
  <pre><code>inactive = list(filter(lambda n: n.get('active') == False, members))
  </code></pre>
  
  <p>Or maybe keep the inactive but not give them new tickets.<br>
  The updates are user inputs for n and tickets.<br>
  So i need to check if the inputs are already in the dict just to update the data needed, ie. If users input 1 for n I just have 1 already so I just update ticket. Else i update both.</p>
  
  <p>But I got a lil stucked in how could I check if the the number I will input in n is already in the dict inside the list.</p>
  
  <p>For new members I can use some like this:</p>
  
  <pre><code>updated = {'n': int(input('number'), 'active': True, 'ticket': int(input('number')}
  </code></pre>
  
  <p>So in summary:<br>
  I need to check if n.value is in the dict, if so update only the ['ticket].value or if not update the dict with n and ticket new values.</p>
  
  <p>Paulo</p>