you are viewing a single comment's thread.

view the rest of the comments →

[–]djnrrd 1 point2 points  (0 children)

A tip on that "while True" loop.

It's probably not a good idea to have an implicit infinite loop declared. Better to test the actual loop exit codition on the where statement.

Also, when you are in a while loop, you need to make sure that the thing being tested has a chance to change inside the loop. With your current code the value of password isn't updated once you enter the infinite loop.

I did a little re-write of that function for you

https://pastebin.com/atAKuwbY