1def longest(seq = input("""Please enter a series of random letters,
2i will guess the largest sequence of letters in order""").upper()):
3
4 max_count = 0
5 max_char = ""
6 prev_char = ""
7
8 for current in seq:
9 if prev_char == current:
10 count += 1
11 else:
12 count = 1
13 if count > max_count:
14 max_count = count
15 max_char = current
16 prev_char = current
17 print(max_char,max_count)
18
19longest()