Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jfrd
on Jan 19, 2021
|
parent
|
context
|
favorite
| on:
Unconditional loops are unconditionally awesome
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: