Find how many times an adjacent repeated characters happened in each string using Python [on hold]

The name of the picture


Find how many times an adjacent repeated characters happened in each string using Python [on hold]



It's common to see adjacent repeated characters in online chat. In this problem, I would like to find how many consecutive contiguous characters occur in each word such as:


repeated=0
Hello = 2
common=2
hereee=3
theeereee=6
llllooollll=11



For illustration I do not have any code at this moment to put with this question, I am still trying to find solution.
Using Python if any one have an answer coding or using the regular expressions that would be great.



I hope the problem is clear, if thara is any thing not clear please leave a comment about it and I will edit the question again.
Thank you



This question appears to be off-topic. The users who voted to close gave this specific reason:





I can feel frustration right now, but we're sorry, this question is off-topic for this site.
– Jean-François Fabre
yesterday





The last part of your comment was enough to deliver the information. There was no need for the first two sentences.
– Azz
yesterday




Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

How to scale/resize CVPixelBufferRef in objective C, iOS