logo

Crowdly

Browser

Add to Chrome

The following code segment is supposed to display all of the elements in a list ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

The following code segment is supposed to display all of the elements in a list with dashes between them. For example, if values contains [1, 2, 3, 4, 5] then the program should display 1-2-3-4-5.

 

result = ""

for i in range(len(values)) :

   if i > 0 :

      _____________________

   result = result + str(values[i])

 

print(result)

What line of code should be placed in the blank to achieve this goal?

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on elearn.squ.edu.om?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome