Skip to content

Commit efa3de2

Browse files
authored
Update 9.md
1 parent 9e7117c commit efa3de2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

md/9.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ In [1]: float('3')
1717
Out[1]: 3.0
1818
```
1919

20+
```python
21+
float('inf') # 正无穷大
22+
float('-inf') # 负无穷大
23+
```
24+
2025
如果不能转化为浮点数,则会报`ValueError`:
2126

2227
```python

0 commit comments

Comments
 (0)