def remove_quotes(text):
  """Removes lines that begin with '>', indicating a Reddit quote."""
  lines = text.split('\n')
  nonquote_lines = [l for l in lines if not l.startswith('>')]
  text_with_no_quotes = '\n'.join(nonquote_lines).strip()
  return text_with_no_quotes or text