in reply to Re: converting strings to ints
in thread converting strings to ints
As usual, when I see a contrived example, I want to ask about the real application. Contrived examples are sometimes okay but in this case, the reason for evaluating empty strings arithmetically is missing. Why was this thought necessary? How are these empty strings really being generated? What is the real significance of emptiness here (or, should I say, there)?
The situation: multiple csv files are to be combined into one file. The csv files look like this:
itemA,,2,,4 itemB,1,,, ----- itemA,1,,, itemA,,,3,
With the result being:
itemA,1,2,3,4 itemB,1,,,
In other words, there are 4 slots for numbers corresponding to each item--like an array.
|
|---|