Re: sys.stdin.readline() results in extra space send to stdout

2006-03-06 Thread Steve Holden
Benjamin Rutt wrote: > There has been a problem that has been bugging me for a while for > reading input from standard in. Consider the following simple program: > > #!/usr/bin/env python > import sys > print 'enter something: ', > answer = sys.stdin.readline().strip() > print

sys.stdin.readline() results in extra space send to stdout

2006-03-06 Thread Benjamin Rutt
There has been a problem that has been bugging me for a while for reading input from standard in. Consider the following simple program: #!/usr/bin/env python import sys print 'enter something: ', answer = sys.stdin.readline().strip() print 'you answered {%s}' % (answer) When