title: Iterate through a list without using a loop
body: <p>I am currently working on a zabbix script to add users with their groups. One user has many groups and the <a href="https://www.zabbix.com/documentation/3.2/manual/api/reference/user/create" rel="nofollow noreferrer">zabbix documentation</a> has the section as:</p>
  
  <pre><code>"usrgrps": [
              { "usrgrpid": "7" },
              { "usrgrpid": "8" },
              { "usrgrpid": "9" }
             ]
  </code></pre>
  
  <p>I have a list of group ids that I want to replace in the place of <code>7,8,9</code> with <code>list[0], list[1], list[2]</code></p>
  
  <p>I have tried using <code>.join</code> method:</p>
  
  <pre><code>mylist = ['12','13','14']
  z =  '"usrgrpid":"'.join(mylist)
  s = '"usrgrps": [{"%s"},]' % (z)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>'"usrgrps": [{"12"usrgrpid":"13"usrgrpid":"14"},]'
  </code></pre>