Hi I have a text file which has the following:
'username=sonia\n', 'password=password'
I want to split sonia and place it in a variable called username.
I was able to accomplish the following but could not remove the new line characters.
text = 'username=sonia\n', 'password=password'
text[0].split('=')[1]
This returns 'sonia\n'
So now how do I get rid of the \n?
What should be modified to also remove the new line '\n'?
Thanks in advance.
Sonia