title: One-liner Python code for setting string to 0 string if empty
body: <p>What is a one-liner code for setting a string in python to the string, 0 if the string is empty?</p>
  
  <pre><code># line_parts[0] can be empty
  # if so, set a to the string, 0
  # one-liner solution should be part of the following line of code if possible
  a = line_parts[0] ...
  </code></pre>