pip install contexts python from contexts import suppress, redirect_stdout python with suppress(FileNotFoundError): file = open('nonexistent.txt', 'r') python with open('output.txt', 'w') as f, redirect_stdout(f):


上一篇:
下一篇:
切换中文