Ok no i got a new problem with the code. when im use append to continue adding to the list it over writes it instead of adding new data. i tryed extend to getting the same problem.
this is how i wanted to print
instead i get the last added data when i print the list like this.
this is my code so far.
this is how i wanted to print
Quote:test1-1-1-1
test1-1-2-2
test1-1-3-3
test2-2-1-1
test2-2-2-2
test2-2-3-3
instead i get the last added data when i print the list like this.
Quote:test2-2-1-1
test2-2-2-2
test2-2-3-3
this is my code so far.
def funktion(self): value1 = (self.a1.get()) value2 = (self.a2.get()) value3 = (self.a3.get()) value4 = (self.a4.get()) value5 = (self.a5.get()) self.mylist = [] for parts in range(value3-1, value5): #print('{}-{}-{}-{}\n'.format(value1, value2, parts+1, parts+1)) #self.text_entry.insert(END, '{}-{}-{}-{}\n'.format(value1, value2, parts+1, parts+1)) self.mylist.append('{}-{}-{}-{}'.format(value1, value2, parts+1, parts+1)) print ('\n'.join(self.mylist)) def file_save(self): print ('\n'.join(self.mylist))