<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(self, filePath, skipLines=0, separator = ',', stringSeparator = '"', lineSeparator = '\n') : 		"""Loads a CSV file"""

		
		self.filename = filePath
		f = open(filePath)
		if lineSeparator == '\n' :
			lines = f.readlines()
		else :
			lines = f.read().split(lineSeparator)
		f.flush()
		f.close()
		
		lines = lines[skipLines:]
		self.lines = []
		self.comments = []
		for l in lines :
			# print l
			if len(l) != 0 and l[0] != "#" :
				self.lines.append(l)
			elif l[0] == "#" :
				self.comments.append(l)

		self.separator = separator
		self.lineSeparator = lineSeparator
		self.stringSeparator = stringSeparator
		self.legend = collections.OrderedDict()
		
		i = 0
		for c in self.lines[0].lower().replace(stringSeparator, '').split(separator) :
			legendElement = c.strip()
			if legendElement not in self.legend :
				self.legend[legendElement] = i
			i+=1
	
		self.strLegend = self.lines[0].replace('\r', '\n').replace('\n', '')
		self.lines = self.lines[1:]