code: def findrootname(filename):
      
  
      puncloc = [filename.find(char) for char in string.punctuation]
      if sys.version_info[0] >= 3:
          val = sys.maxsize
      else:
          val = sys.maxint
      for num in puncloc:
          if num !=-1 and num < val:
              val = num
      return filename[0:val]
docs: Return the rootname of the given file.