Skip to content

Instantly share code, notes, and snippets.

@MichaelCurrie
Last active December 14, 2022 10:19
Show Gist options
  • Select an option

  • Save MichaelCurrie/46bb0c5b1704112a655d12f69dbaddc3 to your computer and use it in GitHub Desktop.

Select an option

Save MichaelCurrie/46bb0c5b1704112a655d12f69dbaddc3 to your computer and use it in GitHub Desktop.

Revisions

  1. MichaelCurrie revised this gist Dec 14, 2022. No changes.
  2. MichaelCurrie created this gist Dec 14, 2022.
    9 changes: 9 additions & 0 deletions yield_to_lamb_chop.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    def the_song_lyrics():
    while True:
    yield "This is the song that doesn't end"
    yield "Yes it goes on and on my friends"
    yield "Some people started singing it, not knowing what it was"
    yield "And they'll continue singing it forever, just because"

    for lyric in the_song_lyrics():
    print(lyric)