Mar-26-2018, 07:27 AM
Calling
iter()
should workdef func(seq): seq = iter(seq) for thing in seq: if thing == 'w': return seq, thing s, t = func('hello world') print(list(s))
Output:['o', 'r', 'l', 'd']