使用Unicode字符
您可以使用Unicode字符来表示度数符号,其Unicode代码点是U+00B0。
```python
degree_symbol = '\u00B0'
angle = 60
print(f"The angle is {angle}{degree_symbol}")
使用第三方库
您还可以使用Python的`math`库来输入度数符号,该库提供了许多与数学相关的功能。
```python
import math
angle = 60
angle_symbol = math.degrees(angle)
print(f"The angle is {angle}{angle_symbol}")
以上两种方法都可以在Python中输入度数符号