as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
create a function that takes a string and a number, and reverses the given string the number of times specified.
user
def reverse_string(string, num): 
  for _ in range(num):
    string = string[::-1]
  return string 

reverse_string("hello", 3)
assistant