I need to write a program that will determine the length of the spaces between successive occurrences of a given character. If the occurrences are adjacent, the space between them is considered to be 1.
I can only calculate between two signs
text = input ('enter text')
find = input ('enter a search character')
x = text.find(find)
y = text.rfind(find)
dist = text.rfind(find) - text.find(find)
print(dist)