Page 40 - Python Cơ Bản
P. 40

'Lš˜RK    'PEWW







          0ϼT XVɳRL LšЪRK чРM XšвRK Pɧ QШX OLɨM RMЖQ OLɺRK XLВ


          XLMЎY XVSRK L϶Y LЎX GɨG RKɺR RKо XLɺRK HдRK LMЖR RE]


          4]XLSR GˢRK LЦ XVв PϼT XVɳRL LšЪRK чРM XšвRK ZЪM GɨG OLɨM

          RMЖQ 'PEWW  3FNIGX  3ZIVVMHIŷ




               /LEM FɨS QШX 'PEWW






          /LEM FɨS QШX GPEWW XLIS Gɾ TLɨT WEY





           class myclass([parentclass]):


               assignments
               def __init__(self):


                   statements
               def method():


                   statements
               def method2():


                   statements





          :ɴ Hд QШX GPEWW






           class animal():

               name = ''
   35   36   37   38   39   40   41   42   43   44   45