cal*_*pto 1 python error-handling python-3.x f-string
我正在尝试处理 f 字符串中的错误,但我的尝试似乎不起作用。有没有办法做到这一点?
string = f"For example I thought this syntax would work but it doesn't {try: 5/0 except Exception: str(infinity)}"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
186 次 |
| 最近记录: |