Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use a co-routine to generate the magic numbers. Something like this:

  def gen_magic_nums():
     for i in range(100):
        yield i**2

  for num in gen_magic_nums():
     add_to_plot(num)


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: