from __future__ import print_function
”’
Week Two Assignment 2 – File Processing
”’
”’
Complete the script below to do the following:
1) Open the file redhat.txt
a) Iterate through each line of the file
b) Split eachline into individual fields (hint str.split() method)
c) Examine each field of the resulting field list
d) If the word “worm” appears in the field then add the worm name to the set of worms
e) Once you have processed all the lines in the file
sort the set
iterate through the set of worm names
print each unqiue worm name
3) Submit
A) Screenshot of the results in WingIDE
B) Your Script
”’
import os
uniqueWorms = set()
with open(“redhat.txt”, ‘r’) as logFile:
for eachLine in logFile:
”’ your code starts here ”’
https://we.tl/t-227e3oCfzL this is the link to the file redhat.txt
can you please #comment each line
We are a professional custom writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework.
Yes. We have posted over our previous orders to display our experience. Since we have done this question before, we can also do it for you. To make sure we do it perfectly, please fill our Order Form. Filling the order form correctly will assist our team in referencing, specifications and future communication.
1. Click on the “Place order tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
2. Fill in your paper’s requirements in the "PAPER INFORMATION" section and click “PRICE CALCULATION” at the bottom to calculate your order price.
3. Fill in your paper’s academic level, deadline and the required number of pages from the drop-down menus.
4. Click “FINAL STEP” to enter your registration details and get an account with us for record keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
5. From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.
Need this assignment or any other paper?
Click here and claim 25% off
Discount code SAVE25