nth root of a number python

## How this will work is it takes the n to the power -1 root of num
## n to the power -1 is just 1 over n

def root(num, n):
  return a**(n**-1)

print(root(27, 3))

Here is what the above code is Doing:
1. It takes the n to the power -1 root of num
2. n to the power -1 is just 1 over n
3. So it takes the 1 over n root of num
4. So it takes the nth root of num