__author__ = 'xilei'

import os
from os.path import join
import stat


def chmod(targetdir):
    """
     remove *.pyc files
    """
    for root, dirs, files in os.walk(targetdir):
        for file in files:
            prefix,ext = os.path.splitext(file)
            if ext == '.pyc':
                filename = join(root,file)
                os.remove(filename)
                print("remove:%s" % filename)


if __name__ == '__main__':
    chmod('./')

__author__ = 'xilei'

import os
from os.path import join
import stat


def rmpyc(targetdir):
    """
     remove *.pyc files
    """
    for root, dirs, files in os.walk(targetdir):
        for file in files:
            prefix,ext = os.path.splitext(file)
            if ext == '.pyc':
                filename = join(root,file)
                os.remove(filename)
                print("remove:%s" % filename)


if __name__ == '__main__':
    rmpyc('./')

Change function name chmod to rmpyc
Change function name chmod to rmpyc

  __author__ = 'xilei'
  
  import os
  from os.path import join
  import stat
  
  
- def chmod(targetdir):
+ def rmpyc(targetdir):
      """
       remove *.pyc files
      """
      for root, dirs, files in os.walk(targetdir):
          for file in files:
              prefix,ext = os.path.splitext(file)
              if ext == '.pyc':
                  filename = join(root,file)
                  os.remove(filename)
                  print("remove:%s" % filename)
  
  
  if __name__ == '__main__':
-     chmod('./')
+     rmpyc('./')
  
Change function name chmod to rmpyc
## Code Before:
__author__ = 'xilei'

import os
from os.path import join
import stat


def chmod(targetdir):
    """
     remove *.pyc files
    """
    for root, dirs, files in os.walk(targetdir):
        for file in files:
            prefix,ext = os.path.splitext(file)
            if ext == '.pyc':
                filename = join(root,file)
                os.remove(filename)
                print("remove:%s" % filename)


if __name__ == '__main__':
    chmod('./')

## Instruction:
Change function name chmod to rmpyc
## Code After:
__author__ = 'xilei'

import os
from os.path import join
import stat


def rmpyc(targetdir):
    """
     remove *.pyc files
    """
    for root, dirs, files in os.walk(targetdir):
        for file in files:
            prefix,ext = os.path.splitext(file)
            if ext == '.pyc':
                filename = join(root,file)
                os.remove(filename)
                print("remove:%s" % filename)


if __name__ == '__main__':
    rmpyc('./')
