I'd have used

"this is a string".split("\\s+");

in Java

On Apr 18, 11:52 am, Vinay Julme <[email protected]> wrote:
> Java:
> String []str = "this is a string".split(" ");
> for(int i = str.length-1; i >=0; i--)
> System.out.println( str[ i ] );
>
> 2011/4/18 João Víctor Rocon Maia <[email protected]>
>
>
>
>
>
>
>
> > Python:
> > tokens = raw_input().split(' ')
> > for i in tokens:
> >    print i
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "google-codejam" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/google-code?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to