def f1():
    print(11)
    yield
    print(22)
    yield
    print(33)

def f2():
    print(55)
    yield
    print(66)
    yield
    print(77)

v1 = f1()
v2 = f2()

next(v1) # v1.send(None)
next(v2) # v1.send(None)
next(v1) # v1.send(None)
next(v2) # v1.send(None)
next(v1) # v1.send(None)
next(v2) # v1.send(None)

相关文章:

  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2021-07-20
  • 2018-12-06
  • 1970-01-01
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2021-05-04
  • 2022-12-23
  • 2021-09-09
  • 2023-03-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案