Stripping in Python
Peter Otten
__peter__ at web.de
Thu Jan 15 05:43:44 EST 2015
Abdul Abdul wrote:
> I have a program where I read a line input from the keyboard.
>
> If I remove this portion of code after reading the line, I get an error:
>
> line = line.rstrip()
>
> Why is that? Should stripping be always be used after reading an input in
> Python?
What version of Python are you using? How do you read the line of input?
If you provide a small program that shows the behaviour you describe we can
probably help you fix it in no time.
More information about the Python-list
mailing list