How can I find the position of a specific text string inside my text?
For example, I have the text "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", and when I search for "ipsum" I want to find out its position.
if "ipsum" in text:
print position
else:
pass
The position I'm looking for is something like "1.6" If I want to change the color of the text it looks like this:
text.tag_add("foo", "1.28", "1.39")
Then in order to change the color of the text that I''ve searched for I need to get its postion somehow, right? I could be wrong but I'm looking for some example or guidance. Thanks! :)