python关于goto语句的熟悉 简单构造一个add()函数利用goto语句实现range()函数类似功能 from goto import with_goto @with_goto def add(start, stop): i = start result = [] label .begin if i == stop: goto .end result.append(i) i += 1 goto .begin label .end return result 运行效果展示: