title: python - create a dynamic list of parameter for a method
body: <p>I want to create a XLSX file in python. For this, I use <a href="https://xlsxwriter.readthedocs.org" rel="nofollow">xlsxwriter</a>.</p>
  
  <p>In my XLSX I want to highlight some part of text with the <a href="https://xlsxwriter.readthedocs.org/en/latest/example_rich_strings.html" rel="nofollow">write_rich_string</a> method.</p>
  
  <p>But, my string is not a fixed value. The part I want to highlight can be randomly placed into it. Or I can have multiples part of the text to highlight.</p>
  
  <p>So, can I create a "list of parameters" for the call of write_rich_string? And what is the method to made this?</p>
  
  <p>Example:</p>
  
  <pre><code>mystring = "I want this in [tag_1]yellow[/tag_1] and this in [tag_2]green[/tag_2]."
  
  worksheet.write_rich_string('A1',
                          'I want this in',
                          yellow, 'yellow',
                          ' and this is ',
                          green, 'green')
  
  worksheet.write_rich_string('A1', my_list_of_parm)
  </code></pre>