title: Django views.py invalid syntax
body: <p>I want to send email to multiple recipients in Django, using SendGrid.</p>
  
  <p>In my <strong>views.py</strong> file I have this and it works:</p>
  
  <pre><code>data = {
      "personalizations": [
          {
              "to": [
                  {"email": "address@example.com"},
                  {"email": "address2@example.com"},
              ],
              "subject": "New message
          }
      ],
      "from": {
          "email": email
      },
      "content": [
          {
              "type": "text/plain",
              "value": message
          }
      ]
  }
  </code></pre>
  
  <p>But I want to add addresses from loop. So, I use:</p>
  
  <pre><code>"to": [
      for address in addresses:
          {"email": address},
  ],
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <pre><code>    for address in addresses:
        ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>What is the correct syntax?</p>