【发布时间】:2020-06-26 13:20:40
【问题描述】:
我正在尝试处理 f 字符串中的错误,但我的尝试似乎不起作用。有没有办法做到这一点?
string = f"For example I thought this syntax would work but it doesn't {try: 5/0 except Exception: str(infinity)}"
【问题讨论】:
标签: python python-3.x error-handling f-string