KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to print out the contents of a set and when I do, I get the set identifier in the print output. For example, this is my output set(['a', 'c', 'b', 'e', 'd', 'f', 'gg', 'ff', 'jk']) " for the code below. I want to get rid of the word set . My code is very simple and is below. infile = open("P3TestData.txt", "r") words = set(infile.read().split()) print words Here is my output again for easy reference: set(['a', 'c', 'b', 'e', 'd', 'f', 'gg', 'ff', 'jk'])
Tags (comma-separated)
Save Edits
Cancel