Question
Answered step-by-step

Write a python program that does the following:

Prompt for a file name of text words.  Words can be on many lines with multiple words per line.


Read the file, remove all punctuation (leaving just a space between words), and convert the words to a list.  


Call a function you created called list_to_once_words(), that takes a list as an argument and returns a list that contains only words that occurred TWICE in the file.


Print the results of the function with an appropriate description.

Answer & Explanation
Verified Solved by verified expert
<p>fficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis</p> Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer

gue

elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet,

gue

Step-by-step explanation

e ve

  • ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae od
  • ipiscing elit. Nam lacinia pulvinar tortor nec facilisis. P
  • ce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliqu
  • ia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam
  • s a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae od

gue

consectetur adipiscing e

21433704

gue

1 Attachment
Capture.PNG
PNG
Student reviews
100% (2 ratings)