Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 1 , 2 , 3 , 6 , 2 , 3 , 4 , 7 , 8 ] NEW_LINE k = 3 NEW_LINE if ( groupInKConsecutive ( arr , k ) ) : NEW_LINE INDENT print ( " True " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " False " ) NEW_LINE DEDENT DEDENT