Nono, this is what you do:
y = [] # create empty list with name "y" ... y=x[key] # y = 19.75; Now y is a floating point number y.append(x) # append something to a float???
append()
is a method of list
. So you must do:y = [] ... y.append(x[key])... and after the for-loop has finished you will have a list with all the data that you want.