---
title: "Discussion on \"Generator Functions in Python: How to Pause a Function Mid-Execution\" | Hashnode"
description: "Discussion on \"Generator Functions in Python: How to Pause a Function Mid-Execution\". A function that remembers where it left off changes everything."
url: "https://hashnode.com/posts/python-generator-functions-yield-lazy-evaluation/69ce310a2d4d5bd0f0d960b1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Generator Functions in Python: How to Pause a Function Mid-Execution](https://blog.moussaamzat.dev/python-generator-functions-yield-lazy-evaluation?utm_source=hashnode&utm_medium=feed)

A function that remembers where it left off changes everything.

Apr 2 · 10 min read · blog.moussaamzat.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#backend](https://hashnode.com/tag/backend)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#generators](https://hashnode.com/tag/generators)

## Written by

[Moussa Kalam AMZAT](https://hashnode.com/@moussakalamamzat)

@moussakalamamzat · Kigali, Rwanda

  
[View profile](https://hashnode.com/@moussakalamamzat)

Building, breaking, and learning | A developer who teaches what he learns | EdTech enthusiast

I'm Moussa, a Beninese Software Engineer based in Rwanda. I took what many considered an unlikely path, pivoting from Diplomacy and International Relations to Software Engineering. That career switch taught me something I carry into everything I do: the best learning happens when you're willing to start from zero. I work as a full-time software engineer and contribute to nonprofits supporting African students and sport talents in their education. I'm passionate about EdTech and AI and their potential to empower learners across Sub-Saharan Africa. Writing is how I process what I learn and give it back — every article here is something I wish I'd found when I was figuring it out myself. Fun facts: I'm a certified IJF judo instructor, I taught myself English through YouTube, and I'm always one rabbit hole away from picking up something new.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
