In this problem, you should write one function named every_other
.
This function should have one parameter, which will be a string with one or more space-separated words in it.
The function should return a string with every-other word from the parameter string.
I recommend that you follow these steps:
string.split()
function)Shown below are a few examples:
every_other('one fish two fish red fish blue fish')
should return 'one two red blue'
every_other('these are words')
should return 'these words'
Make sure to include only the one function in your file.
The gradescope tests will call the functions to test them.
Name the program prep23.py
.
Make sure that gradescope gives you the points for passing the test case.