LearnPy Hub
← Tuples & Sets problems
Hard

Longest Run Without Repeats

Read a word and print the length of the longest block of consecutive letters with no repeated letter.

Input

One word.

Output

A length.

Sample 1

Input
abcabcbb
Output
3

Sample 2

Input
bbbbb
Output
1
solution.py
Output appears here
Longest Run Without Repeats · Python practice problem · LearnPy Hub