code: def get_EOL(file):
      
      f = open(file, 'r')
      firstline = f.read(350)
      EOL = ""
      for k in range(350):
          if firstline[k:k + 2] == "\r\n":
              print(file, ' appears to be a dos file')
              EOL = '\r\n'
              break
      if EOL == "":
          for k in range(350):
              if firstline[k] == "\r":
                  print(file, ' appears to be a mac file')
                  EOL = '\r'
      if EOL == "":
          print(file, " appears to be a  unix file")
          EOL = '\n'
      f.close()
      return EOL
docs: find EOL of input file (whether mac,PC or unix format)