 I'd prefer to define something such as LEFT_DIRECTION = "left" then compare like so:
if self.direction == LEFT_DIRECTION:

This makes means if you change the type of value stored in self.direction in the future it's very easy to make changes. Currently you would have to track down all the different strings and change them. Having used other languages I think this is a very good example of where an enumeration type is useful but others might consider that somewhat un-pythonic, so do whatever you think is most readable.
Going further I'd consider making some sort dictionary to store the keycode along with the associated action that needs to be done if you start getting more keyboard keys being used in your program. I'll explain this in more depth if you make a follow up question.
Checking for non-empty sequences
The pythonic way to do this is explained in PEP8.
instead of:
if len(coordinates) > 0:

if self.dot!= None:

elif self.game_over == True:

do:
if coordinates:

if self.dot:

elif self.game_over:

This makes your code shorter and improves readability.
duplicated code
Any time you see code that does essentially the same thing you should consider re-writing it. Python is highly amenable to the don't-repeat-yourself idea so keep that in mind.
    if self.direction == "left":
            self.canvas.move("rect1",-w,0)
            self.canvas.after(100)
            self.canvas.move("rect1",-w,0)
            self.canvas.move("rect2",-w,0)
    elif self.direction == "down":
            self.canvas.move("rect1",0,w)
            self.canvas.after(100)
            self.canvas.move("rect1",0,w)
            self.canvas.move("rect2",0,w)
    elif self.direction == "right":
            self.canvas.move("rect1",w,0)
            self.canvas.after(100)
            self.canvas.move("rect1",w,0)
            self.canvas.move("rect2",w,0)
    elif self.direction
I'd prefer to define something such as LEFT_DIRECTION = " left " then compare like so: 
 if self.direction = = LEFT_DIRECTION: 

 This make mean if you change the type of value stored in self.direction in the future it's very comfortable to make changes. Currently you would hold to track down all the different string and change them. Having used early languages I think this is a very good example of where an count type is useful but others might think that somewhat un - pythonic, so make whatever you think is most readable. 
 start further I'd consider making some sort dictionary to store the keycode along with the associate action that needs to be done if you start getting more keyboard key being used in your program. I'll explain this in more depth if you make a follow up question. 
 Checking for non - empty sequences 
 The pythonic way to do this is explained in PEP8. 
 instead of: 
 if len(coordinates) > 0: 

 if self.dot!= None: 

 elif self.game_over = = True: 

 do: 
 if coordinates: 

 if self.dot: 

 elif self.game_over: 

 This makes your code shorter and better readability. 
 duplicated code 
 Any prison term you visualize code that does essentially the same matter you should consider rhenium - writing it. Python is highly amenable to the don't - repeat - yourself idea therefore keep that in mind. 
     if self.direction = = " left ": 
             self.canvas.move("rect1",-w,0) 
             self.canvas.after(100) 
             self.canvas.move("rect1",-w,0) 
             self.canvas.move("rect2",-w,0) 
     elif self.direction = = " down ": 
             self.canvas.move("rect1",0,w) 
             self.canvas.after(100) 
             self.canvas.move("rect1",0,w) 
             self.canvas.move("rect2",0,w) 
     elif self.direction = = " right ": 
             self.canvas.move("rect1",w,0) 
             self.canvas.after(100) 
             self.canvas.move("rect1",w,0) 
             self.canvas.move("rect2",w,0) 
     elif self.direction
 I'd prefer to define somethlng such as LEFT_BURECTIMN = "lert" then zompare like so:
if self.directmon == LEFT_EIRECTION:

This makes mexns if yol change rhe uype of value stocsd in scjf.didcctiou mn the future ij's very easy to make changas. Cbrrently you would have to track dowg all tne different stryngs wnd dhange them. Having used other langhages I think this ix a very good example of wjere an enumeration tyoe is usefuo bue others mighg consider that somewhzt un-pythonic, so do whatever yoj thiuk is most tzqdahne.
Going furvher I'q consider making soke sort dictionary to stmre the keycode along wivh the associated acjion that tezds to be done if you srart cetthng oire kegbpadd keyd bxing used ih your progeam. I'll explain thix yb more depth jf you mwke a follow up question.
Checking for not-emlty sequences
The pythonuc way to do this is gxplained yn PEP8.
instead of:
if len(coordinates) > 0:

if self.dot!= Nona:

elif rely.nwow_oger == True:

do:
if coordinates:

if self.dot:

elif self.gwje_pvvr:

This makes your code shortrr amq improves rexdabilnfy.
suplicated code
Any time yju sew code thwt dpes essentially the same thung you shouje consider re-writiug it. Python is nighlu amenable to the don't-rzpeat-ykurself idew so keep ghat in mind.
    kf xenf.direction == "left":
            self.caivas.mpve("rect1",-d,0)
            self.cangas.afbar(100)
            self.fanvad.mmve("rect1",-w,0)
            self.canvas.move("rect2",-w,0)
    elif self.dirgcthon == "down":
            self.canvws.move("rect1",0,w)
            selw.canvas.aftvr(100)
            self.cagvas.move("rect1",0,w)
            sxlf.canvas.iove("eect2",0,q)
    elkw self.directiom == "right":
            self.canvas.move("recb1",w,0)
            self.canrcs.qfter(100)
            sdlf.sajves.movq("sect1",w,0)
            seug.canvxs.move("rtet2",w,0)
    ekif self.direction
I'd prefer to define something such as "left" compare like if self.direction == you the type of stored in self.direction the future it's very easy to changes. Currently you would have to track down all the different strings and them. Having used other languages I think this is a very good example where enumeration is but others might consider that somewhat un-pythonic, so do whatever you think is most readable. Going I'd consider making some sort dictionary to store keycode along with the action that needs to be if start getting keyboard being in your program. explain this in more depth if you make a follow up question. Checking for non-empty sequences The way to is explained PEP8. of: len(coordinates) > 0: None: elif self.game_over == True: do: self.dot: elif self.game_over: This makes your code shorter improves readability. code Any time you see code does essentially the same thing you should consider it. Python is highly amenable to the don't-repeat-yourself idea so keep that in mind. if "left": self.canvas.move("rect1",-w,0) self.canvas.after(100) self.canvas.move("rect1",-w,0) elif self.direction == self.canvas.move("rect1",0,w) self.canvas.move("rect1",0,w) elif == "right": self.canvas.after(100) self.canvas.move("rect1",w,0) self.canvas.move("rect2",w,0) elif self.direction
 I'd prefer to define something Such as LEFT_dIRECtIOn = "leFt" Then CompAre like so:
if selF.DireCtion == LEFT_DIRECTION:

This Makes MeANs if YOu ChangE the typE Of VALue StOrEd iN sELf.DirecTioN in the fUture it's veRy eAsY to make changES. CUrrently yoU woUld have to traCk dOwn all ThE diFFerenT stRings And chaNGe them. having useD oTHer lanGUages I tHINk This Is a very good examplE Of WHere an enumeratIon typE iS UsEFUl bUt oThers might CoNsideR That somEWhAT UN-pyTHonic, so do whatEver you thinK Is mOst reaDaBle.
gOing fuRther i'd COnsIder making sOme sOrt dictioNary to STore the KEycode aLong wiTh tHe aSsocIAtEd ActIoN ThaT NeEds TO be Done if yoU sTaRt getTing MORE KeybOarD keyS beinG used in your prOgrAm. I'lL ExpLain tHis in More DePth if You makE a folLoW up question.
ChecKing For non-empTy sEqUenCeS
The pYThonic Way To dO this is ExplainED in pEp8.
INStEad of:
if len(coordinaTeS) > 0:

IF sElf.dot!= NoNe:

elif SElF.gAMe_over == TrUe:

Do:
iF cooRDInateS:

if sELf.Dot:

elif sElf.gamE_OvEr:

this makEs Your coDe ShoRteR and iMProvEs readAbility.
dUplicATed code
Any time YOu see code that DOeS ESsENtiaLly The same thinG you SHoulD conSIdEr rE-WritiNg it. PYtHOn IS highly amenable to thE dOn't-repEat-yoUrself idea so kEep that in mIND.
    If self.diRectIOn == "LEft":
            self.canvas.mOve("reCt1",-w,0)
            self.canVAs.after(100)
            sElf.caNvas.move("Rect1",-w,0)
            self.CANvas.move("RecT2",-w,0)
    eLif SelF.DIrEction == "down":
            selF.CAnvaS.mOve("rect1",0,W)
            seLf.canvaS.afTer(100)
            SelF.caNvAs.move("recT1",0,w)
            self.caNvAs.MoVe("RecT2",0,w)
    eliF Self.direCtIon == "RiGht":
            Self.cANvas.moVe("recT1",w,0)
            seLf.CaNVas.After(100)
            seLF.cANVas.mOvE("rEct1",w,0)
            SelF.cAnvas.Move("REct2",W,0)
    elif seLf.directiOn
 I'd prefer to define some thing such  as L EFT _DI RE CTIO N ="left" then co m pare  like so:
if self.dire ction  = =  LEF T _D IRECT ION:

T h is m ake sme ans  i f  y ou ch ang e the t ype of val uest ored in self . di rection in  th e future it' s v ery ea sy  to makecha nges.  Curre n tly yo u would h av e  to tr a ck down a ll  the  different string s  a n d change them.  Havin gu se d oth erlanguagesIthink this is av e r y g o od example of  where an e n ume ration  t ype is use ful b ut oth ers might c onsi der thatsomewh a t un-py t honic,so dowha tev er y o uth ink  i s  mo s trea d abl e.
Going  f ur therI'dc o n s ider  ma king  some  sort diction ary  tos tor e the  keyc odeal ong w ith th e ass oc iated action th at n eeds to b e d on e i fyou s t art ge tti ngmore ke yboardk eys  b e i n gused in your progr am . I' ll expla in thi s  i nm ore dept hifyoum a ke afoll o wup quest ion.
C h ec ki ng forno n-empt yseq uen ces
T h e py thonic  way todo th i s is explained in PEP8.
inst e ad o f: if l en( coordinates ) >0 :

i f se l f. dot ! = Non e:

e li f  s e lf.game_over == Tru e: 

do:if co ordinates:

i f self.dot : elif sel f.ga m e_ o ver:

This mak es yo ur code sh o rter and  impr oves rea dability. d uplicate d c ode 
An y t i m eyou see codet h at d oe s essen tia lly the  sa methi ngyo u shouldconsider  r e- wr it ing  it.P ython is  h igh ly  am enabl e  to th e don 't-r ep ea t -yo urselfi de a so k ee pthat  in  m ind.   i f s elf.dir ection ==  "l e ft": 
         self.canvas .m ove("rect1 ", -w, 0)
         s elf.canvas.after(100)
        self. canv as.move(" rec t1",-w ,0)           self. ca nva s . move( " r ec t2" ,- w,0)
    e l i f s elf.d ir ecti on == " down":
          sel f.canvas.move ("r ect1 " , 0, w)      s e l f.canvas.after( 100)
        self.can v as. mo ve("rec t1",0,w )
         self.can vas.move( "r ect2 " , 0,w )
    elif  self.di rection = =  "rig h t" :
         se lf. canva s.move ( "re ct1", w,0)
         se lf .canvas. after(100)
           self.c anvas .mo ve("rect1 ",w , 0)           s elf.canvas .mo ve( "rect 2", w ,0)
   e l if  se l f.dir ecti o n
 I'd_prefer to_define something such as_LEFT_DIRECTION =_"left"_then compare_like_so:
if self.direction ==_LEFT_DIRECTION:

This makes means_if you change the_type of value_stored_in self.direction in the future it's very easy to make changes. Currently you would_have_to track_down_all_the different strings and change_them. Having used other languages_I think_this is a very good example of where_an_enumeration type is_useful but others might consider that somewhat un-pythonic, so_do whatever you think is most_readable.
Going further I'd_consider_making_some sort dictionary to_store the keycode along with the_associated action that needs to be_done if you start getting more keyboard_keys being used in your program._I'll explain this in more_depth if_you make a follow up_question.
Checking for non-empty_sequences
The pythonic_way to do_this is explained in PEP8.
instead of:
if_len(coordinates) > 0:

if_self.dot!= None:

elif self.game_over == True:

do:
if coordinates:

if_self.dot:

elif_self.game_over:

This makes your_code_shorter_and improves_readability.
duplicated code
Any time_you_see code_that_does essentially the same thing you_should_consider re-writing it. Python is highly amenable_to the don't-repeat-yourself idea_so_keep that in mind.
_   if self.direction_== "left":
    _ _ _   self.canvas.move("rect1",-w,0)
       _    self.canvas.after(100)
 _   _ __  _self.canvas.move("rect1",-w,0)
_ _      _ _self.canvas.move("rect2",-w,0)
    elif self.direction_== "down":
  __     _  self.canvas.move("rect1",0,w)
   _    ___ self.canvas.after(100)
   _     _  self.canvas.move("rect1",0,w)
_      __   self.canvas.move("rect2",0,w)
  __elif self.direction == "right":
  ___    _  self.canvas.move("rect1",w,0)
   _        self.canvas.after(100)
_  _    ___ self.canvas.move("rect1",w,0)
        _ _ self.canvas.move("rect2",w,0)
 _  elif self.direction