Write a python program that has the following functionality: 1. read input from a file containing a list of words (each word is written on its own line) and store the data (strings) in a list Hint: try using the readline() function or a for loop 2. randomly select a string from the list 3. output / write the selected string to a new file

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
100%

Write a python program that has the following functionality:
1. read input from a file containing a list of words (each word is written on its own line) and store the data (strings) in a list
Hint: try using the readline() function or a for loop
2. randomly select a string from the list
3. output / write the selected string to a new file

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
InputStream
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