title: When splitting an empty string in Python, why does split() return an empty list while split('\n') returns ['']?
body: <p>I am using <code>split('\n')</code> to get lines in one string, and found that <code>''.split()</code> returns an empty list, <code>[]</code>, while <code>''.split('\n')</code> returns <code>['']</code>. Is there any specific reason for such a difference?</p>
  
  <p>And is there any more convenient way to count lines in a string?</p>