Discuss / Python / 作业

作业

Topic source

doctest 内,如果想跳过某一步,可以使用 SKIP,用法如下:

到下一章你可能会用到。

```

>>> f = open("032_文件读写.py", "r")>>> f.read() # doctest: +SKIP>>> f.close()

```

```python

>>> f = open("test.py", "r")

>>> f.read()  # doctest: +SKIP

>>> f.close()

```


  • 1

Reply