user
Tell me how would you respond to the following request.
Create a function that takes a string and a number, and reverses the given string the number of times specified.

assistant
def reverse_string(string, num): 
  for _ in range(num):
    string = string[::-1]
  return string 

reverse_string("Hello", 3)