Sorry for the late reply, I did modify your code. Though not the best but works:
401-501
501-401
402-502
502-402
403-503
503-403
404-504
504-404
405-505
505-405
.......
def funktion(self): value1 = (a1.get()) value2 = (a2.get()) value3 = (b1.get()) value4 = (b2.get()) steps = 0 for a in range(value1-1, value2): print('{}-{}\n'.format(a+1, value3 + steps)) print('{}-{}\n'.format(value3 + steps, a+1)) steps +=1Modify your
def funktion(self)and you will get your desired output.
401-501
501-401
402-502
502-402
403-503
503-403
404-504
504-404
405-505
505-405
.......