0

I am trying to count the number of sentences in a text but I do not get the correct number anytime I run this line.

import re

n = input("Text: ")

sent = len(re.split(r'[.!?]+', n))
print(f"{sent}", end="")
eyllanesc
  • 221,139
  • 17
  • 121
  • 189

0 Answers0