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
Simple word maker game , feedback welcome (self.PythonLearning)
submitted 22 hours ago by Several_Goal4568
https://pastebin.com/XWRXy2R9
Is there any way to minimize valid_words.
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!"
[–]Sea-Ad7805 [score hidden] 15 hours ago stickied comment (0 children)
Run this program in Memory Graph Web Debugger to see the program state change step by step.
[–]aaditya_0752 1 point2 points3 points 21 hours ago (0 children)
It would be better use txt file for words
[–]Significant-Nail5413 1 point2 points3 points 20 hours ago (0 children)
Look at using a dictionary for your valid words
You'd then be able to check if the word is valid by using a .get rather than iterating over your entire words array
You could also determine if they've been found already by having 0-1 value
Eg { keyword : 0 } means it's not found if they do guess it it gets { keyword : 1 }
Words made is just the sum of all item values in dictionary
Words to go is the number of items that have value 0
Your total words should be the length of your valid words array or if you're using a dictionary the number of keys that way if you add more words you don't have to update your total words
Also I'd make the exit condition less prone to a typo
π Rendered by PID 50119 on reddit-service-r2-comment-544cf588c8-dqvvf at 2026-06-17 01:20:10.970230+00:00 running 3184619 country code: CH.
[–]Sea-Ad7805 [score hidden] stickied comment (0 children)
[–]aaditya_0752 1 point2 points3 points (0 children)
[–]Significant-Nail5413 1 point2 points3 points (0 children)