How can I select a string in python knowing the start and end points?
If the string is:
Evelin said, "Hi Dude! How are you?" and no one cared!!
Or something like this:
Jane said *aww! thats cute, we must try it!* John replied, "Okay!, but not now!!"
what I want to write is a function that selects from the " "
not by counting the index,
but something that just selects the text from character to character,
"Hi Dude! How are you?"
and "Okay!, but not now!!"
so how can I do this? is there a built in function ?
I know there is a built-in function in python that get the index of the given character
ie,
find("something")
returns the index of the given string in the string.
or it need to loop through the string?
I'm just starting with python, sorry for a little question like this. python 2 or 3 is just okay!! thank you so much!!
Update:
Thank you everyone for the answers, as a just beginner I just wanna stick with the built in split()
function quotes = string.split('"')[1::2]
just because its simple. thank you all. so much love :)