how to make list of dictionary with an input from text file

It's because, the list is created within the loop, and thus it is created newly every iteration. Thus, define the list outside the loop and append the dictionary to it, and print the list after the loop's execution, like this...

def baca_data(filename):
    file = open(filename,"r")
    teks = file.readlines()
    tabungan = []
    for line in teks:
        line = line.split() # indeks[0] name, indeks[1] price, next index is addiction from index[2] till index[5]
        d = {}
      
        isi = [[line[0], line[1], int(line[2]) + int(line[3]) + int(line[4]) + int(line[5])]]
        format = ["name","price","total total"]
        for item in isi:
            for key, value in zip(format,item):
                d[key] = value
        tabungan.append(d)
    
    print(tabungan)