Skip to content

Instantly share code, notes, and snippets.

@trsqxyz
Created April 11, 2015 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trsqxyz/79dbcf78de4168c942da to your computer and use it in GitHub Desktop.
Save trsqxyz/79dbcf78de4168c942da to your computer and use it in GitHub Desktop.
def life(self, times=4, first='*', last=None):
yield first
for _ in range(times):
yield '*'
if last is None:
raise StopIteration
yield last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment