tamam o zaman burdan atiyim caniniz sagolsun
def gorunum ():
kare1kutucuk1 =canvas.create_rectangle(4*i , 1*j , 5*i , 2*j ,outline='white',fill=dizi1 [0] [0] [0])
kare1kutucuk2=canvas.create_rectangle(4*i , 2*j , 5*i , 3*j , outline='white' , fill=dizi1 [0] [0] [1])
kare1kutucuk3=canvas.create_rectangle(4*i , 3*j , 5*i , 4*j , outline='white' , fill=dizi1 [0] [0] [2])
kare1kutucuk4=canvas.create_rectangle(5*i , 1*j , 6*i , 2*j , outline='white' , fill=dizi1 [0] [1] [0])
kare1kutucuk5=canvas.create_rectangle(5*i , 2*j , 6*i , 3*j , outline='white' , fill=dizi1 [0] [1] [1])
kare1kutucuk6=canvas.create_rectangle(5*i , 3*j , 6*i , 4*j , outline='white' , fill=dizi1 [0] [1] [2])
kare1kutucuk7=canvas.create_rectangle(6*i , 1*j , 7*i , 2*j , outline='white' , fill=dizi1 [0] [2] [0])
kare1kutucuk8=canvas.create_rectangle(6*i , 2*j , 7*i , 3*j , outline='white' , fill=dizi1 [0] [2] [1])
kare1kutucuk9=canvas.create_rectangle(6*i , 3*j , 7*i , 4*j , outline='white' , fill=dizi1 [0] [2] [2])
kare2kutucuk1=canvas.create_rectangle(4*i , 7*j , 5*i , 8*j , outline='white' , fill=dizi1 [1] [0] [0])
kare2kutucuk2=canvas.create_rectangle(4*i , 8*j , 5*i , 9*j , outline='white' , fill=dizi1 [1] [0] [1])
kare2kutucuk3=canvas.create_rectangle(4*i , 9*j , 5*i , 10*j , outline='white' , fill=dizi1 [1] [0] [2])
kare2kutucuk4=canvas.create_rectangle(5*i , 7*j , 6*i , 8*j , outline='white' , fill=dizi1 [1] [1] [0])
kare2kutucuk5=canvas.create_rectangle(5*i , 8*j , 6*i , 9*j , outline='white' , fill=dizi1 [1] [1] [1])
kare2kutucuk6=canvas.create_rectangle(5*i , 9*j , 6*i , 10*j , outline='white' , fill=dizi1 [1] [1] [2])
kare2kutucuk7=canvas.create_rectangle(6*i , 7*j , 7*i , 8*j , outline='white' , fill=dizi1 [1] [2] [0])
kare2kutucuk8=canvas.create_rectangle(6*i , 8*j , 7*i , 9*j , outline='white' , fill=dizi1 [1] [2] [1])
kare2kutucuk9=canvas.create_rectangle(6*i , 9*j , 7*i , 10*j , outline='white' , fill=dizi1 [1] [2] [2])
kare3kutucuk1=canvas.create_rectangle(1*i , 4*j , 2*i , 5*j , outline='white' , fill=dizi1 [2] [0] [0])
kare3kutucuk2=canvas.create_rectangle(1*i , 5*j , 2*i , 6*j , outline='white' , fill=dizi1 [2] [0] [1])
kare3kutucuk3=canvas.create_rectangle(1*i , 6*j , 2*i , 7*j , outline='white' , fill=dizi1 [2] [0] [2])
kare3kutucuk4=canvas.create_rectangle(2*i , 4*j , 3*i , 5*j , outline='white' , fill=dizi1 [2] [1] [0])
kare3kutucuk5=canvas.create_rectangle(2*i , 5*j , 3*i , 6*j , outline='white' , fill=dizi1 [2] [1] [1])
kare3kutucuk6=canvas.create_rectangle(2*i , 6*j , 3*i , 7*j , outline='white' , fill=dizi1 [2] [1] [2])
kare3kutucuk7=canvas.create_rectangle(3*i , 4*j , 4*i , 5*j , outline='white' , fill=dizi1 [2] [2] [0])
kare3kutucuk8=canvas.create_rectangle(3*i , 5*j , 4*i , 6*j , outline='white' , fill=dizi1 [2] [2] [1])
kare3kutucuk9=canvas.create_rectangle(3*i , 6*j , 4*i , 7*j , outline='white' , fill=dizi1 [2] [2] [2])
kare4kutucuk1=canvas.create_rectangle(4*i , 4*j , 5*i , 5*j , outline='white' , fill=dizi1 [3] [0] [0])
kare4kutucuk2=canvas.create_rectangle(4*i , 5*j , 5*i , 6*j , outline='white' , fill=dizi1 [3] [0] [1])
kare4kutucuk3=canvas.create_rectangle(4*i , 6*j , 5*i , 7*j , outline='white' , fill=dizi1 [3] [0] [2])
kare4kutucuk4=canvas.create_rectangle(5*i , 4*j , 6*i , 5*j , outline='white' , fill=dizi1 [3] [1] [0])
kare4kutucuk5=canvas.create_rectangle(5*i , 5*j , 6*i , 6*j , outline='white' , fill=dizi1 [3] [1] [1])
kare4kutucuk6=canvas.create_rectangle(5*i , 6*j , 6*i , 7*j , outline='white' , fill=dizi1 [3] [1] [2])
kare4kutucuk7=canvas.create_rectangle(6*i , 4*j , 7*i , 5*j , outline='white' , fill=dizi1 [3] [2] [0])
kare4kutucuk8=canvas.create_rectangle(6*i , 5*j , 7*i , 6*j , outline='white' , fill=dizi1 [3] [2] [1])
kare4kutucuk9=canvas.create_rectangle(6*i , 6*j , 7*i , 7*j , outline='white' , fill=dizi1 [3] [2] [2])
kare5kutucuk1=canvas.create_rectangle(7*i , 4*j , 8*i , 5*j , outline='white' , fill=dizi1 [4] [0] [0])
kare5kutucuk2=canvas.create_rectangle(7*i , 5*j , 8*i , 6*j , outline='white' , fill=dizi1 [4] [0] [1])
kare5kutucuk3=canvas.create_rectangle(7*i , 6*j , 8*i , 7*j , outline='white' , fill=dizi1 [4] [0] [2])
kare5kutucuk4=canvas.create_rectangle(8*i , 4*j , 9*i , 5*j , outline='white' , fill=dizi1 [4] [1] [0])
kare5kutucuk5=canvas.create_rectangle(8*i , 5*j , 9*i , 6*j , outline='white' , fill=dizi1 [4] [1] [1])
kare5kutucuk6=canvas.create_rectangle(8*i , 6*j , 9*i , 7*j , outline='white' , fill=dizi1 [4] [1] [2])
kare5kutucuk7=canvas.create_rectangle(9*i , 4*j , 10*i , 5*j , outline='white' , fill=dizi1 [4] [2] [0])
kare5kutucuk8=canvas.create_rectangle(9*i , 5*j , 10*i , 6*j , outline='white' , fill=dizi1 [4] [2] [1])
kare5kutucuk9=canvas.create_rectangle(9*i , 6*j , 10*i , 7*j , outline='white' , fill=dizi1 [4] [2] [2])
kare6kutucuk1=canvas.create_rectangle(10*i , 4*j , 11*i , 5*j ,outline='white' , fill=dizi1 [5] [0] [0])
kare6kutucuk2=canvas.create_rectangle(10*i , 5*j , 11*i , 6*j ,outline='white' , fill=dizi1 [5] [0] [1])
kare6kutucuk3=canvas.create_rectangle(10*i , 6*j , 11*i , 7*j ,outline='white' , fill=dizi1 [5] [0] [2])
kare6kutucuk4=canvas.create_rectangle(11*i , 4*j , 12*i , 5*j ,outline='white' , fill=dizi1 [5] [1] [0])
kare6kutucuk5=canvas.create_rectangle(11*i , 5*j , 12*i , 6*j ,outline='white' , fill=dizi1 [5] [1] [1])
kare6kutucuk6=canvas.create_rectangle(11*i , 6*j , 12*i , 7*j ,outline='white' , fill=dizi1 [5] [1] [2])
kare6kutucuk7=canvas.create_rectangle(12*i , 4*j , 13*i , 5*j ,outline='white' , fill=dizi1 [5] [2] [0])
kare6kutucuk8=canvas.create_rectangle(12*i , 5*j , 13*i , 6*j ,outline='white' , fill=dizi1 [5] [2] [1])
kare6kutucuk9=canvas.create_rectangle(12*i , 6*j , 13*i , 7*j ,outline='white' , fill=dizi1 [5] [2] [2])
bunlar benim rubik kupumun icerdeki kutucuklari
ornek olmasi amaciyla su da fonksiyonum
def btnfnk () :
gorunum ()
def hareket1():
global dizi1,dizi2
dizi2=[[[dizi1[3][0][0],dizi1[3][0][1],dizi1[3][0][2]],[dizi1[0][1][0],dizi1[0][1][1],dizi1[0][1][2]],[dizi1[0][2][0],dizi1[0][2][1],dizi1[0][2][2]]],
[[dizi1[5][2][2],dizi1[5][2][1],dizi1[5][2][0]],[dizi1[1][1][0],dizi1[1][1][1],dizi1[1][1][2]],[dizi1[1][2][0],dizi1[1][2][1],dizi1[1][2][2]]],
[[dizi1[2][2][0],dizi1[2][1][0],dizi1[2][0][0]],[dizi1[2][2][1],dizi1[2][1][1],dizi1[2][0][1]],[dizi1[2][2][2],dizi1[2][1][2],dizi1[2][0][2]]],
[[dizi1[1][0][0],dizi1[1][0][1],dizi1[1][0][2]],[dizi1[3][1][0],dizi1[3][1][1],dizi1[3][1][2]],[dizi1[3][2][0],dizi1[3][2][1],dizi1[3][2][2]]],
[[dizi1[4][0][0],dizi1[4][0][1],dizi1[4][0][2]],[dizi1[4][1][0],dizi1[4][1][1],dizi1[4][1][2]],[dizi1[4][2][0],dizi1[4][2][1],dizi1[4][2][2]]],
[[dizi1[5][0][0],dizi1[5][0][1],dizi1[5][0][2]],[dizi1[5][1][0],dizi1[5][1][1],dizi1[5][1][2]],[dizi1[0][0][2],dizi1[0][0][1],dizi1[0][0][0]]]]
dizi1=dizi2
btnfnk ()
bu da ornek olmasi amaciyla en distaki yon tuslu butonlarimdan bir tanesi
def Boutons():
Bhareket1 = Button(form, bg= 'black' , command=hareket1 , image = photo)
Bhareket1_form = canvas.create_window(x+260, y-10, window=Bhareket1)