Hello I'm a trying to learn python, In C++ to read in string from stdin I simply do
string str;
while (cin>>str)
do_something(str)
but in python, I have to use
line = raw_input()
then
x = line.split()
then I have to loop through the list x to access each str to do_something(str)
this seems like a lot of code just to get each string delimited by space or spaces so my question is, is there a easier way?