andioop@programming.dev to Programming Horror@programming.devEnglish · edit-22 years agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square56fedilinkarrow-up1217arrow-down121
arrow-up1196arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-22 years agomessage-square56fedilink
minus-squaresloppy_diffuser@sh.itjust.workslinkfedilinkEnglisharrow-up4·2 years 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.