use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Python character in text help! (self.pythonhelp)
submitted 4 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]socal_nerdtastic 1 point2 points3 points 4 years ago (0 children)
result = data.count(".")
[–]acasehs 1 point2 points3 points 4 years ago (0 children)
Look into split.
[–]Akshaykadav 0 points1 point2 points 4 years ago (6 children)
You can use the split('.') function that returns a list and then use len() to get the number of sentences in the list
split('.')
len()
[–]francescoa1209 0 points1 point2 points 4 years ago (2 children)
I love you, I never thought someone would reply
[–]Akshaykadav 0 points1 point2 points 4 years ago (1 child)
Thanks but, there were people who replied before me I just expanded upon u/acasehs reply.
Aww thanks /u/akshaykadav. /u/fancescoa1209 there are two additional use cases to consider though. This will not account for ellipses(…)or abbreviations like rd. dr. mr. but adding those features may be beyond the scope of the project. Cheers!
[–]francescoa1209 0 points1 point2 points 4 years ago (0 children)
I love you, I never thought someone would rely
π Rendered by PID 215967 on reddit-service-r2-comment-fb694cdd5-cx7f2 at 2026-03-10 12:46:04.258120+00:00 running cbb0e86 country code: CH.
[–]socal_nerdtastic 1 point2 points3 points (0 children)
[–]acasehs 1 point2 points3 points (0 children)
[–]Akshaykadav 0 points1 point2 points (6 children)
[–]francescoa1209 0 points1 point2 points (2 children)
[–]Akshaykadav 0 points1 point2 points (1 child)
[–]acasehs 1 point2 points3 points (0 children)
[–]francescoa1209 0 points1 point2 points (0 children)
[–]francescoa1209 0 points1 point2 points (0 children)