Question: 3. Filename: assign1-11.py Using the attached mailbox.txt file. Write a program to read through the mail box data and when you find a line that


3. Filename: assign1-11.py Using the attached mailbox.txt file. Write a program to read through the mail box data and when you find a line that starts with "From", you will split the line into words using the split function. We are interested in who sent the message, which is the second word on the From line. You will parse the From line and print out the second word for each From line, then you will also count the number of "From:" lines and print out a count at the end. H:\>python C:\Users aslsabbaghpourhokma Documents\IT2431\Modulel\assign1-11.py stephen.marquard@uct.ac.za stephen.marquard@uct.ac.za louis@media.berkeley.edu louis@media.berkeley.edu Some output removed ... zach. thomas@txstate.edu dlhaines@umich.edu dlhaines@umich.edu There were 3594 lines in the file with From as the first word 4. Filename: assign1-12.py Write a program to read the numbers from the cmd. You should define a function to extract the duplicates from the entered numbers and make a list of unique numbers. The function should print out the list. The function should use a loop to find the duplicates and you are NOT allowed to use set function. H:1>python C:\Users aslsabbaghpourhokma Documents\IT2431\Modulel assign1-12.py 4 5 6 3 4 1 1 2 3 1 [4, 5, 6, 3, 1, 2] H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Modulel\assign1-12.py 4 5 6 3 4 [4, 5, 6, 3] H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Modulel\assign1-12.py 9 3 8 9 3 9 [9, 3, 8]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
