[Edu-sig] The fate of raw_input() in Python 3000
kirby urner
kirby.urner at gmail.com
Fri Sep 15 23:32:24 CEST 2006
On 9/15/06, kirby urner <kirby.urner at gmail.com> wrote:
> Just go
>
> a = sys.stdin.readline()[:-1] # because you didn't mean to include /n
>
> ?
>
> Kirby
Sorry: \n
>>> print 'the dog\n'
the dog
>>> print 'the dog\n'[:-1]
the dog
>>>
Note extra blank line.
One thing I liked about that Salon article: harping on "line by line"
programming as the criterion. Just dragging and dropping ain't good
enough. We're looking for lexical left brain proficiency, not just
all right brained GUI goo.
Kirby
More information about the Edu-sig
mailing list