details+summary

PS: 下面空一行

  1. <details>
  2. <summary>展开查看</summary>
  3. content ...
  4. </details>

example

  1. <details>
  2. <summary>展开查看</summary>
  3. <pre>
  4. import time
  5. def hello(name='world'):
  6. print(f'hello {name}, {time.asctime()}')
  7. if __name__ == '__main__':
  8. hello()
  9. </pre>
  10. ```python
  11. import time
  12. def hello(name='world'):
  13. print(f'hello {name}, {time.asctime()}')
  14. if __name__ == '__main__':
  15. hello()

``` image.png