Skip to main content

All Questions

Tagged with
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,...
Looser User's user avatar
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: ...
Andrea Ciufo's user avatar
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 ...
jtdans's user avatar
  • 43
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 ...
Conor Mancone's user avatar
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 ...
Ethan Bierlein's user avatar