1. 使用`math.sqrt`函数:
```python
import math
result = math.sqrt(16)
print(result) 输出:4.0
2. 使用幂运算符` `:
```python
result = 16 0.5
print(result) 输出:4.0
3. 使用`cmath.sqrt`函数(用于复数):
```python
import cmath
result = cmath.sqrt(-25)
print(result) 输出:5j
4. 使用`numpy.sqrt`函数(如果需要处理数组):
```python
import numpy as np
result = np.sqrt(16)
print(result) 输出:4.0
请根据您的需求选择合适的方法