Basically, I\'m asking the user to input a string of text into the console, but the string is very long and includes many line breaks. How would I take the user\'s string a
The problem with rstrip is that it does not work in all cases (as I myself have seen few). Instead you can use -
text= text.replace("\n"," ")
this will remove all new line \n with a space.