Yield And Return In Same Function Python