# Write a Python program to Longest Substring Length of K # Python3 code to demonstrate working of # Longest Substring of K# Using loop  # initializing stringtest_str = 'abcaaaacbbaa'  # printing original Stringprint("The original string is : " + str(test_str))  # initializing K K = 'a'  cnt = 0res = 0for idx in range(len(test_str)):          # increment counter on checking    if test_str[idx] == K:        cnt += 1    else:        cnt = 0              # retaining max    res = max(res, cnt)  # printing result print("The Longest Substring Length : " + str(res)) 