Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In python, rework exercise 30 with the word union in the ninth line changed to intersection. Please also put screenshot of your code. In Exercises
In python, rework exercise 30 with the word union in the ninth line changed to intersection. Please also put screenshot of your code.
In Exercises 30 through 32, describe the new file created by the code. Assume the file Ny Times. txt contains the names of subscribers to the New York Times and the file wsJ.txt contains the names of the subscribers to the Wall Street Journal. 30 infile open ("NYTimes. r') .txt", times List Cline. rstrip for line in infile] in file close timesset. sets (timesList) infile open ("WSJ.txt. 'r') wsjList. Cline. rstrip for line in infile] in file close wsjset. sets (wsjList) combinationset. timesSet.union (wsjset) combinationList list (combinationset) combinationstring ('In') oin (combination List outfile open ("NewFile.txt", 'w') outfile write (combinations tring) outfile closeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started