Question: Write a function longestWordInLine ( ) that takes two parameters: - name 1 , an input file name containing words and white spaces - name
Write a function longestWordInLine that takes two parameters:
name an input file name containing words and white spaces
name an output file name
For each line in the input file, the function writes to the output fle the longest word. If more than one such word exists, write the last one.
For example, if input file contains:
It is what it is
python is fun
finals are coming soun
the content of the outpul fle will be
what
pythor
coming
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
