Question: Question 2 : Order code Find and print the index of the second dash in the input string. Assume that there are at least two

Question 2: Order code
Find and print the index of the second dash in the input string.
Assume that there are at least two dashes in the string.
User input is gathered as follows:
s = input("Input: ")
Drag from here
print(i)
c =0
i =0
while i < len(s):
if s[i]=='-':
c +=1
if c ==2:
break
i +=1
i=1
print(c)
c=1
Construct your solution here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!