<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replaceNewlines(string, newlineChar):
 	"""There's probably a way to do this with string functions but I was lazy. 		Replace all instances of \r or \n in a string with something else."""

	if newlineChar in string:
		segments = string.split(newlineChar)
		string = ""
		for segment in segments:
			string += segment
	return string