Comment

Comment by ksaho

I was lazy so I just did:

import itertools as itools

xs = [f'{i}-{j}' for i in range(30) for j in range(12)]

ys = ['b', 'g']

zs = list(itools.product(xs, ys))

boys = [z for z in zs if z[1] == 'b']

len(boys)/len(zs)

----

gives me 0.5, or 1/2.

The moral of the article is to set up your universal set correctly and do not throw out any information, now matter how irrelevant.

parent ksaho 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton