title: Python String to Int Or None
body: <p>Learning Python and a little bit stuck.</p>
  
  <p>I'm trying to set a variable to equal <code>int(stringToInt)</code> or if the string is empty set to <code>None</code>.</p>
  
  <p>I tried to do <code>variable = int(stringToInt) or None</code> but if the string is empty it will error instead of just setting it to None.</p>
  
  <p>Do you know any way around this?</p>