python  The text document feelings.txt contains lines that alternate between a date and a mood. For example, the first few lines are:   17/12/1999 grumpy 19/01/2000 happy 23/04/2003 sleepy It continues in this fashion. Reformat this text so that the data from the first two lines is condensed into a single line that reads:   On 17/12/1999, I was feeling grumpy. Continue this formatting for all other lines of data in feelings.txt , and save this new text to a document called logbook.txt .

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 3GZ
icon
Related questions
Question

python 

The text document feelings.txt contains lines that alternate between a date and a mood. For example, the first few lines are:

 

17/12/1999

grumpy

19/01/2000

happy

23/04/2003

sleepy

It continues in this fashion. Reformat this text so that the data from the first two lines is condensed into a single line that reads:

 

On 17/12/1999, I was feeling grumpy.

Continue this formatting for all other lines of data in feelings.txt , and save this new text to a document called logbook.txt .

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage