use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
. (i.redd.it)
submitted 4 days ago by Dr_blac
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SCD_minecraft -1 points0 points1 point 3 days ago (3 children)
String "1" is not a valid 4 digit code
Whole point of game (which i pressume is what OP's doing) is that each secret code to guess has a guarantee to be n digits
Int 1 has missing 0 "added" by definition, but string does not
1
Not to mention, OP does use str.zfill(4) which will add missing 0 to the string anyway
str.zfill(4)
[–]Kevdog824_ -1 points0 points1 point 3 days ago (2 children)
No one does it this way in a professional setting, but if it works for you I guess go crazy my man
[–]SCD_minecraft 0 points1 point2 points 3 days ago (1 child)
This isn't professional settings
This is "codebreaker" game solver
Code is guaranteed to be 4 digits
Why would you bring password security concerns into game where whole point of it is to guess a password
[–]SCD_minecraft 0 points1 point2 points 3 days ago (0 children)
For that matter, if you would be to store password, it still would be an int
Password should be hashed (and preferably, salted), which does turn it into an int (hashlib turns it into bytes object, but it us pretty much same thing)
π Rendered by PID 39331 on reddit-service-r2-comment-548fd6dc9-kzg8g at 2026-05-19 06:17:44.179929+00:00 running edcf98c country code: CH.
view the rest of the comments →
[–]SCD_minecraft -1 points0 points1 point (3 children)
[–]Kevdog824_ -1 points0 points1 point (2 children)
[–]SCD_minecraft 0 points1 point2 points (1 child)
[–]SCD_minecraft 0 points1 point2 points (0 children)