1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blagie [28]
3 years ago
13

g Write a function called chain_words(str) which takes in one parameter which is a string that holds multiple words separated by

spaces. Your function should return a string with the words chained together with an - (hyphen). You can first split the words at spaces and then join the words with - (hyphen). You can achieve this by using split and join methods respectively.
Computers and Technology
1 answer:
Oduvanchick [21]3 years ago
7 0

Answer:

Explanation:

The following is written in Python. The function takes in a string as a parameter. It then sperates the string at every space. Then it rejoins the list of strings with hyphens. Finally, returning the newly created string with hyphens.

def chain_words(str):

   string_split = str.split(" ")

   seperator = '-'

   hyphen_string = seperator.join(string_split)

   return hyphen_string

You might be interested in
If you turn your volume to loud on u'r headphones can it break the sound quality of the speaker?
zzz [600]
Yes, it is possible to "blow the speaker" in your headphones by listening to loud music (such as high BPM stuff, like extratone or extremely bass-ey stuff)
7 0
3 years ago
Read 2 more answers
Help!!!!!!!!!!!!!!!!!!!
ExtremeBDS [4]
Column if the answer.
6 0
3 years ago
________ are devices used to send data between two networks.
svetoff [14.1K]
The answer is routers
4 0
3 years ago
What is an examlple of cyberbullying
Alex73 [517]

Answer:

sending rude text messages

Explanation:

3 0
3 years ago
What technology allows data to be stored in one place and be retrieved by many systems?
Mice21 [21]
ICloud is one of the many different tech options.
Hope I helped,
 Ms. Weasley
4 0
3 years ago
Other questions:
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • A benefit of IPsec is __________.
    8·1 answer
  • WILL GIVE BRAINLIEST! A rent payment is an example of which type of expense?
    14·2 answers
  • Maria is comparing her history project's second-place award to her classmate's first-place award. She starts planning how to win
    6·2 answers
  • which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging
    10·1 answer
  • You are a network technician for a small corporate network. It's been decided that the office needs a wireless network for emplo
    6·1 answer
  • Design a hierarchy c hart or flowchart for a program that calculates the current balance in a savin gs account. The program must
    8·1 answer
  • The variable planet_distances is associated with a dictionary that maps planet names to planetary distances from the sun. Write
    12·1 answer
  • Which of the following is input devices? (a)Scanner (b) Keyboard (c) Both a and b (d) Plotter​
    5·1 answer
  • IPv4 and IPv6 are addresses used to identify computers on the Internet. Is this whether true or not:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!