Can you provide a Python code for the Towers of Hanoi problem using recursion?
def hanoi(n, source, target, auxiliary):
if n == 1:
print("Move disk 1 from rod {} to rod {}".format(source, target))
return
hanoi(n-1, source, auxiliary, target)
print("Move disk {} from rod {} to rod {}".format(n, source, target))
hanoi(n-1, auxiliary, target, source)
"""