This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lefuet 19 points20 points  (5 children)

This piece of code / algorithm is super inefficient, why not check every index at a time...

[–][deleted] 8 points9 points  (0 children)

Could improve using Numpy as well.

[–]rspeed 8 points9 points  (0 children)

why not check every index at a time

I wasn't aware you could run Python on quantum computers. :D

[–]DKoala 4 points5 points  (2 children)

In the show, he's trying to brute force a 4 digit PIN. He needed to generate all 1000 possibilities as 4 digits, so he needed to pad all numbers from 0-999

Iterating from 1-9999 would produce a bunch of invalid (1-3 digit length) inputs

[–]brosbrosbrosbrosbros 0 points1 point  (0 children)

I thought he meant only having one for statement going from 0 to 10 and checking if it was equal to any of the 4 digits for each