how do you convert this string array '[1, 2, 3]'
to an interger array
ok so this is not my real code but the part thats breaking
totalammount = [1,2,3]
file = open("save", "w")
file.write(str(totalammount))
file = open("save", "r")
saveditems = file.read()
print(int(saveditems))
but if i run this it will say: ValueError: could not convert string to float: '[1, 2, 3]'
expected output: [1, 2, 3], so i can take out the numbers in the array
saveditems[0]
can anyone help me?