Same problem as before, but you decide to use more of your new Python skills. You are going to increase the spaces between the words. Write a function that takes a string and a number of spaces to insert between each word, then print out the resulting string.
```
def spaceout(astring, number):
pile = ""
space = " "
parts = astring.split()
for index in range(0,len(parts)-1):
pile = pile+ parts[index]+number*space
pile = pile+parts[len(parts)-1]
print pile
```
Additionally, the question specifically calls for spaces to be inserted between each word, not after each, which requires an implementation similar to the above. A simpler function that prints spaces after every word, even the last one, would be:
```
def spaceout(astring, number):
pile = ""
space = " "
parts = astring.split()
for index in range(0,len(parts)):
pile = pile+ parts[index]+number*space
print pile
```
You might also like to view...
Due to their similarities, it’s easy to create a parallel relationship between an array and a __________.
a. TextBox b. GroupBox c. ComboBox d. RadioButton
A DHCP server dynamically assigns what to the machines on an as-needed basis?
a. MAC address b. IP address c. Protocol address d. All of these answers are correct. e. None of these answers is correct.
Define named anchors and discuss their uses on a web page.
What will be an ideal response?
The ____________________ is a hard disk interface that can support up to eight or fifteen peripheral devices.
Fill in the blank(s) with the appropriate word(s).