This is my current code:
def poisci_pare(besedilo):
import re
seznam = re.split("[.]", besedilo)
return seznam
this returns (we assume the sentences will always end with a dot .)
poisci_pare("Hello world. This is great.")
>>>output: ["Hello world", "This is great"]
What would I have to write to get python to split the string like this:
poisci_pare("Hello world. This is great.")
>>>output: [["Hello", "world"], ["This", "is", "great"]]
.typically means any character in regex ... I guess when its in a box bracket it treats it as a literal ...