All Questions
Tagged with set python-3.x
5
questions
8
votes
3
answers
143
views
Compressed output of set in Python
In order to provide a better output of sets with many consecutive elements (a similar class could be written for a list or tuple,...
5
votes
2
answers
763
views
Filtering a List based on a Suffix and avoid duplicates
I was wondering if there is a better way to solve this issue.
I have a list like this:
...
4
votes
2
answers
6k
views
From a set of words, output all words that fit a string of random letters (like Scrabble)
I am in my first year of programming with Python 3 and am wondering if anyone had a better way to program this problem. When the user provides up to 7 random letters as a single string, the program ...
5
votes
1
answer
245
views
Finding added keys, removed keys, and unchanged keys in ordereddict
I'm comparing two OrderedDict objects and I need to find added keys, removed keys, and keys that are present in both (the intersection). Sets are designed for ...
11
votes
3
answers
484
views
"AI" chat program
I've thrown together this simple chat program, and while it works. I think it could certainly use some improvement. Here's how it works.
Obtain user input by removing all punctuation from the input ...