题目:
题解:
Test = "godding"
target = "d"i = 0left = i
lc = 0
right = i
rc = 0while Test[left] != target:left -= 1lc += 1if left == -1:left = len(Test) - 1while Test[right] != target:right += 1rc += 1if right == len(Test):right = 0print(left, lc)
print(right, rc)