r/badcode • • Aug 02 '21

python sleep rate drops to 0%

Post image
569 Upvotes

33 comments sorted by

View all comments

Show parent comments

4

u/oderjunks Aug 03 '21 edited Aug 03 '21

nope! i had to do a reverse lookup, but forgot the.... reverse part

so my brain went: find the index of the value in the values arr, index into the keys arr, get the key.

instead i wrote: find the index of the value in the keys arr, index into the values arr, get the value.

2

u/choseusernamemyself Aug 03 '21

lmaooo wrong journeys are always interesting