title: How to use re.split for commas and periods?
body: <p>I have multiple strings where words are split with commas or periods:</p>
  
  <pre><code>string = ['apple,pear,grapes,carrot.cabbage,veggies.fruit,yard']
  </code></pre>
  
  <p>I would like to split this based on commas and periods:</p>
  
  <pre><code>string = ['apple','pear','grapes','carrot','cabbage','veggies','fruit','yard']
  </code></pre>
  
  <p>I only know how to use one condition for re.split:</p>
  
  <pre><code>re.split(',',string)
  </code></pre>
  
  <p>this won't split words that have periods in between. How can I split the whole string so that words are split when there are commas or periods in between?</p>