1mylist = []
2# Assuming that you have loaded data into a lines variable.
3for line in lines:
4 mylist.append(line.strip().split('\t')
1# Remove all line breaks from a long string of text
2
3mystr = 'hello world, how do i enter line breaks?'
4>>> mystr.replace(' ', '')
5'helloworld,howdoienterlinebreaks?'
6
7# You can also replace more then one thing for example:
8mystring = mystring.replace('\n', ' ').replace('\r', '')
9