Generate a programming code to solve this problem
Problem: Write a function to reverse a given string.
def reverse(string): 
    string = string[::-1] 
    return string
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Generate a programming code to solve this problem

### Response:
def reverse(string): 
    string = string[::-1] 
    return string