Skip to main content
3 of 6
added 1 character in body
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48

Python 3, 148 143 140 bytes

import re s,c,n=list(input()+'1'),[],0 while s:c,n=(c,n+1)if re.match('[a-zA-Z]',s.pop(0))else(c+[n]if n else c,0) print(max(c,key=c.count)) 

Try it online!

Uses regex to check if character is a letter of the English alphabet and adds the count of all consecutive alphabets to a list and finds the mode of that list.

-3 bytes thanks to Rahul Verma

Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48