I have a problem, I save an expression from a website that is for example “ab” in a dictionary… the problem is that the expression comes with an \n and alters my whole key, what can I do?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m partial to string.rstrip(‘\n’) – this way it only strips newlines, and only from the right end of the string.