Is there a \"straightforward\" way to convert a str containing numbers into a list of [x,y] ints?
# from: \'5,4,2,4,1,0,3,0,5,1,3,3,14,32,3,5\' # to: [[5, 4
>>> num_str = '5,4,2,4,1,0,3,0,5,1,3,3,4,3,3,5' >>> inums = iter([int(x) for x in num_str.split(',')]) >>> [[x, inums.next()] for x in inums] [[5, 4], [2, 4], [1, 0], [3, 0], [5, 1], [3, 3], [4, 3], [3, 5]] >>>