Why the second next doesn't return "bye" ?
def salute():
yield "hello"
yield "bye"
def greet_me():
print(next(salute()))
print(next(salute()))
greet_me()
Output :
hello
hello
Why the second next doesn't return "bye" ?
def salute():
yield "hello"
yield "bye"
def greet_me():
print(next(salute()))
print(next(salute()))
greet_me()
Output :
hello
hello