代码示例:(标识:python_for_else)
python_for_else.py
for x in range(10):
  print(x)
else:
  print("Finally finished!")
运行结果: