@[email protected] to Programming [email protected]English • edit-27 months agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square52fedilinkarrow-up1206arrow-down121
arrow-up1185arrow-down1imageGod I wish there was an easier way to do thisprogramming.dev@[email protected] to Programming [email protected]English • edit-27 months agomessage-square52fedilink
minus-square@sloppy_diffuserlinkEnglish4•7 months agofor i in itertools.count(): ... will count to infinity. Better make it into a dictionary so it’s O(1) complexity instead of O(n) while you’re at it.
for i in itertools.count(): ...
will count to infinity.Better make it into a dictionary so it’s O(1) complexity instead of O(n) while you’re at it.