Skip to main content
deleted 1 character in body
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48

Python 3, 148 143 140 132 100100 99 bytes

  
cn,n=[]*c=0,0 for x in input()+'1': if'`'<x.lower()<'{':n+=1 elif n:c+=n,;n=0 print(max(c,key=c.count)) 

Try it online!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

-32 bytes thanks to ovs

-1 byte thanks to DLosc

Python 3, 148 143 140 132 100 bytes

 
c,n=[],0 for x in input()+'1': if'`'<x.lower()<'{':n+=1 elif n:c+=n,;n=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

-32 bytes thanks to ovs

Python 3, 148 143 140 132 100 99 bytes

 
n,*c=0, for x in input()+'1': if'`'<x.lower()<'{':n+=1 elif n:c+=n,;n=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

-32 bytes thanks to ovs

-1 byte thanks to DLosc

added 11 characters in body
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48

Python 3, 148 143 140 132132 100 bytes

  
import re s,c,n=list(input()+'1'),[]n=[],0 whilefor s: x ifin re.matchinput('[a-zA-Z]',s)+'1': if'`'<x.poplower(0))<'{':n+=1 elif n:c,n=c+[n]c+=n,0;n=0 print(max(c,key=c.count)) 

Try it online!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

-32 bytes thanks to ovs

Python 3, 148 143 140 132 bytes

 
import re s,c,n=list(input()+'1'),[],0 while s:  if re.match('[a-zA-Z]',s.pop(0)):n+=1 elif n:c,n=c+[n],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

Python 3, 148 143 140 132 100 bytes

 
c,n=[],0 for x in input()+'1': if'`'<x.lower()<'{':n+=1 elif n:c+=n,;n=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

-32 bytes thanks to ovs

added 5 characters in body
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48

Python 3, 148 143 140140 132 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:n+=1  elseelif n:c,n=c+[n],0) print(max(c,key=c.count)) 

Try it online!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

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

Python 3, 148 143 140 132 bytes

import re s,c,n=list(input()+'1'),[],0 while s: if re.match('[a-zA-Z]',s.pop(0)):n+=1  elif n:c,n=c+[n],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

added 1 character in body
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48
Loading
added 2 characters in body
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48
Loading
Source Link
Manish Kundu
  • 5.4k
  • 2
  • 18
  • 48
Loading