I have a list of strings:
a = ['[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]',
'[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]',
'[3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0]',
'[4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0]',
'[5.0, 5.0, 5.0]',
'[1.0]'
]
When I use the code as below, the format for every element in the list is string, not the int.
a= tuple(a.reshape(1,-1)[0])
What I need to do is change the format for all elements. Such as
a[1][2] = 2
However, in my code:
a[1][2] = '.'
ais a list of strings.