Could someone explain this behaviour on python 2.7.8:
Python 2.7.8 (default, Nov 12 2014, 02:03:09)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = ''
>>> a.split()
[]
>>> a.split('\n')
['']
split by any white space gives an empty list, but split by new line gives a list with an empty string. WHY?
Thanks