input: Write a python function to remove comments from a given text using regular expressions.
  assert remove_comments("# This is a python comment\nprint(\"Hello world\") # This is another comment")=="print(\"Hello world\")"
  assert remove_comments("print(\"Hello world\") # This is a comment")=="print(\"Hello world\")"
  assert remove_comments("/* This is a block comment */\nprint(\"Hello world\")")=="print(\"Hello world\")"
output: def remove_comments(text):
      import re
      # Remove single-line comments starting with #
      text = re.sub(r'#.*', '', text)
      # Remove block comments /* */
      text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL)
      # Strip leading and trailing whitespace lines
      return text.strip()