title: Shortening Code by Using Loops/Functions to get rid of Repeated Words
body: <p>In my Intro to CS class, we have an assignment where we have to shorten the lyrics of &quot;The Fox&quot; using Python. There are 7 lines with repeated words and 2 sets of consecutive repeated lines. I used functions to repeat the consecutive lines, but I can't think of a way to use loops or functions to shorten the lines with repeated words. A few examples of those lines with repeated words:</p>
  <p>print(&quot;Dog goes woof, cat goes meow.&quot;)</p>
  <p>print(&quot;Bird goes tweet, and mouse goes squeak.&quot;)</p>
  <p>print(&quot;Cow goes moo. Frog goes croak, and the elephant goes toot.&quot;)</p>
  <p>These lines repeat &quot;goes,&quot; but I am just not sure how to shorten the code using loops or functions so that it prints in the same way above but with less code.</p>