data_initial = read_data() a=[] while(True): data = read_data() a.append(data) print(a[-1]) #To print the last val