Re: Help me split a string into elements

2021-09-04 Thread Neil
DFS wrote: > Typical cases: > lines = [('one\ntwo\nthree\n')] > print(str(lines[0]).splitlines()) > ['one', 'two', 'three'] > > lines = [('one two three\n')] > print(str(lines[0]).split()) > ['one', 'two', 'three'] > > > That's the result I'm wanting, but I get data in a slightly differen

Re: Help me split a string into elements

2021-09-04 Thread DFS
On 9/4/2021 5:55 PM, DFS wrote: Typical cases:  lines = [('one\ntwo\nthree\n')]  print(str(lines[0]).splitlines())  ['one', 'two', 'three']  lines = [('one two three\n')]  print(str(lines[0]).split())  ['one', 'two', 'three'] That's the result I'm wanting, but I get data in a slightly di