Hot answers tagged

6 votes

pset6 python bleep

Is the problem that you have hardcoded the input file to "banned.txt"? From the specification: Accepts as its sole command-line argument the name (or path) of a dictionary of banned words (i.e., ...
DinoCoderSaurus's user avatar
2 votes

How do I make this work if user inputs uppercase words that are in the banned text? It only works if it matches exactly how it is in the text file

Technical aspects of your question: When posting Python code, make sure indentation is preserved. This looks like you took the code by reddit user /u/randolph_777 and dumped it here, making it pass ...
Blauelf's user avatar
  • 20.9k
1 vote

pset6 bleep: Problem with difference between list and string

Firstly, the method split returns a list; and as per the line inputList = [input.split()] your're enclosing the returned list within another which yields the nested list. Secondly, you might want to ...
Ashen Gunaratne's user avatar
1 vote

pset6 python bleep

The block of code that needs to be changed is as mentioned below after the line 15: save the file name from the command line argument into a variable called banned_text banned_text = argv[1] ...
Sridevi K S's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible