title: Python - Get string after and before a Character
body: <p>I've this strings:</p>
  
  <pre><code>"I have been working - 8h by day"
  "Like - 9H by Month"
  </code></pre>
  
  <p>I'm trying to get the number of Hours. Basically I'm trying to get this output:</p>
  
  <pre><code>8
  9
  </code></pre>
  
  <p>I try this but without success:</p>
  
  <pre><code>print(myString.split("H",1)[1] )
  </code></pre>
  
  <p>But I'm getting this:</p>
  
  <pre><code>builtins.IndexError: list index out of range
  </code></pre>
  
  <p>How can I get the string after "-" and before "H" in Python?</p>
  
  <p>Thanks!</p>