Get all words or characters between two characters python
text_in_between = string.split(first_word)[1].split(second_word)[0]
Full example:
string = "Once upon a time"
first_word = "Once"
second_word = "time"
text_in_between = string.split(first_word)[1].split(second_word)[0]
print(text_in_between)
SNAPPED!

SNAPPED!
Comments
Post a Comment