An ugly way is to use evalf:
>>> eval(str(a).replace("'","")) [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
If you do not mind all your numbers in one array, you can go:
>>> a = [['1','2','3'],['4','5','6'],['7','8','9']] >>> map(int,sum(a,[])) [1, 2, 3, 4, 5, 6, 7, 8, 9]
robert king
source share