title: Python - split string into dictionary
body: <p>My situation is following.
  I have a sting "list" like this</p>
  
  <pre><code>Text1
  Text2: value1
  Text3:
  Text4:
  Text5: value2
  ...
  </code></pre>
  
  <p>Now I want to split the text into a dictionary with Key-Value Pair.</p>
  
  <p>I tryed it with this 1liner</p>
  
  <pre><code>sp = dict(s.split(':') for s in list.split('\n') if len(s) &gt; 1 and s.count(':') &gt; 0)
  </code></pre>
  
  <p>This works great until there is no value like in Text3 and Text4.</p>
  
  <p>My final dictionary should look like this</p>
  
  <pre><code>{ Text2:value1,Text3:'',Text4:'',Text5:value2 }
  </code></pre>
  
  <p>Text1 should be skipped - but Text3 &amp; Text4 I need in the dictionary, also if the value is empty.</p>