Skip to content

Instantly share code, notes, and snippets.

@rupa
Created May 31, 2017 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupa/53d2cedf7746f5ef8a00c8f7bb1b6914 to your computer and use it in GitHub Desktop.
Save rupa/53d2cedf7746f5ef8a00c8f7bb1b6914 to your computer and use it in GitHub Desktop.
In [1]: x = 'a\rb\rc'
In [2]: x.split()
Out[2]: ['a', 'b', 'c']
In [3]: x.split()
Out[3]: ['a', 'b', 'c']
In [4]: x = 'a\r\nb\r\nc'
In [5]: x.split()
Out[5]: ['a', 'b', 'c']
In [6]: x = 'a\nb\nc'
In [7]: x.split()
Out[7]: ['a', 'b', 'c']
In [8]: x = 'a\nb\r\nc'
In [9]: x.split()
Out[9]: ['a', 'b', 'c']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment