pyth icon indicating copy to clipboard operation
pyth copied to clipboard

Better input parsing

Open jakobkogler opened this issue 10 years ago • 2 comments
trafficstars

A bunch of golfing challenges give the input in a really stupid format like 1,2,abc or 1 2 3. It would be nice if there's a method that splits and evaluates them into [1, 2, "abc"] and [1, 2, 3]. Or even let Q and .Q do the work.

jakobkogler avatar May 19 '15 13:05 jakobkogler

There's already rQ7, which splits by whitespace and evaluates.

Ypnypn avatar May 19 '15 22:05 Ypnypn

@Ypnypn O.k. This takes care of the 1 2 3 input format. But the other example I posted is still really painful to parse.

jakobkogler avatar May 19 '15 22:05 jakobkogler