input: Write a function to simulate a loop that takes user input until 'q' is entered, and prints each input.
  assert simulate_loop(['hello', 'world', 'q']) == ['hello', 'world']
  assert simulate_loop(['test', 'input', 'q', 'ignore this']) == ['test', 'input']
  assert simulate_loop(['q']) == []
output: def simulate_loop(inputs):
      result = []
      for input_str in inputs:
          if input_str == 'q':
              break
          result.append(input_str)
      return result