User input question

Erik Max Francis max at alcyone.com
Thu May 30 05:19:58 EDT 2002


Eric Brunel wrote:

> Considering your HTML form, I don't know if it's the right thing to
> do, but
> here is the exact equivalent of your C++ code:
> 
> import sys
> s = sys.stdin.readline()
> search_word(s)

Not quite, actually.  cin >> s gets the next string delimited by
whitespace, not the next line.  (The next line would be std::getline.)

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Who'd ever think it / Such a squalid little ending
\__/ The American and Florence, _Chess_
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.



More information about the Python-list mailing list