title: Splitting a string by multiple characters (python)
body: <p>Ok so I know I can split a string using the .split method every time a character/a sequence of characters appears - for example, in the following code, when I use the .split method, the <code>&lt;string&gt;</code> is splitted every time <code>:</code> appears in it</p>
  
  <pre><code>&lt;string&gt;.split(":")
  </code></pre>
  
  <p>But I can't give it multiple arguments, so that the string is splitted if one of the arguments appears.</p>
  
  <p>For example, given this input string:</p>
  
  <pre><code>input_string = """ \ hel\lo ="world"""
  </code></pre>
  
  <p>I want to split the <code>input_string</code> every time <code>\</code>, <code>=</code>, <code>"</code>, or <code>&lt;blank space&gt;</code> appears, so that i get the following output:</p>
  
  <pre><code>['hel', 'lo', 'world']
  </code></pre>
  
  <p>I know that a solution for this could be:</p>
  
  <pre><code>non_alfanumeric = """\\=" """
  input_string = """ \ hel\lo ="world"""
  
  for char in non_alfanumeric:
      input_string = input_string.replace(char, " ")
  
  list = input_string.split(" ")
  while "" in list:
      list.remove("")
  </code></pre>
  
  <p>but this would be too much computationally slow if the input string is very long, because the code has to check the whole string 4 times: first time for <code>\</code>, second time for <code>=</code>, third time for <code>"</code>, fourth time for <code>&lt;blank space&gt;</code>.</p>
  
  <p>What are other solutions?</p>