title: Delete items from a dict list containing google drive flies
body: <p>I need to delete some items from a dict list. This list is produced by a call to Google Drive Rest Api.</p>
  
  <p>I've tried several code samples but I can't make it work. I'm a Python newbie.</p>
  
  <pre><code>#this is the Google Api call
  theFiles = drive_service.files().list(fields="files(id,name,modifiedTime, size, fileExtension)").execute()
  
  #here I am trying to iterate the results and delete all items that refer to a "temp" file:
  
  for k, v in theFiles.items():
      if v[4]=="tmp":
          del theFiles[k]
  </code></pre>
  
  <p>I was expecting that records containing a "tmp" extension would be deleted from this list, however I can't make it work. </p>
  
  <p>I thought that <code>v[4]</code> whould refer to the "fileExtension" field of the dictionary. However, when I debug I see that <code>v[4]</code> contains the whole item, for example:</p>
  
  <pre><code>{'fileExtension': 'docx', 'id': '1u7zrCm3waGr9CiEmPl...F2acV7NvC', 'modifiedTime': '2019-05-03T18:59:19.000Z', 'name': '~$ LENGUA PROG.docx', 'size': '162'}
  </code></pre>
  
  <p>Please help me understand how to write the right code to delete items with the ".tmp" extension.</p>