<jupyter_start><jupyter_text>Code Signal Diving Deeper  Extract Eack Kth (34)Given array of integers, remove each kth element from it. ExampleFor inputArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and k = 3, the output should besolution(inputArray, k) = [1, 2, 4, 5, 7, 8, 10].<jupyter_code>def extractEachKth(inputArray, k):
    loop = ((len(inputArray) - (len(inputArray)%k))/k)
    loop = int(loop)
    L = []
    for i in range(loop):
        L.insert(0,i+1)
    for i in L:
        del inputArray[(i*k)-1]
    return inputArray<jupyter_output><empty_output><jupyter_text>First Digit (35)Find the leftmost digit that occurs in a given string. ExampleFor inputString = "var_1__Int", the output should besolution(inputString) = '1';For inputString = "q2q-q", the output should besolution(inputString) = '2';For inputString = "0ss", the output should besolution(inputString) = '0'.<jupyter_code>def firstDigit(inputString):
    #output the first digit found in a string
    L = list(inputString)
    J = []
    for i in L:
        if i.isnumeric():
            J.append(i)
    return J[0]<jupyter_output><empty_output><jupyter_text>Different Symbols Naive (36)Given a string, find the number of different characters in it. ExampleFor s = "cabca", the output should besolution(s) = 3.There are 3 different characters a, b and c.<jupyter_code>from collections import Counter
def differentSymbolsNaive(s):
    ## Given a string, find the number of different characters in it.
    c = Counter(s)
    getList(c)
    return len(c)
    
def getList(dict):
    ## Create a list of all the keys in a given dictionary
    ## For example getList(Dictionary["SubDictionary"])
    ## Or getList(Dictionary)
    list = []
    for key in dict.keys():
        list.append(key)
          
    return list<jupyter_output><empty_output><jupyter_text>Array Max Consecutive Sum (37)Given array of integers, find the maximal possible sum of some of its k consecutive elements. ExampleFor inputArray = [2, 3, 5, 1, 6] and k = 2, the output should besolution(inputArray, k) = 8.All possible sums of 2 consecutive elements are:2 + 3 = 5;3 + 5 = 8;5 + 1 = 6;1 + 6 = 7.Thus, the answer is 8.<jupyter_code>def arrayMaxConsecutiveSum(inputArray, k):
    ## Given array of integers, find the maximal possible sum of some of its k consecutive elements.
    S = sum(inputArray[:k])
    M = S
    for i in range(len(inputArray) - k):
        S += ( inputArray[i+k] - inputArray[i])
        if M < S:
            M = S
    return M<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11102299762093576, 'fraction_numerical': 0.024187153053132435, 'mean_word_length': 3.5956284153005464, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '274399', 'license': 'MIT', 'n_tokens_mistral': 874, 'n_tokens_neox': 820, 'n_words': 286, 'path': 'CodeSignal/Arcade/Intro/08_Diving_Deeper.ipynb', 'repo_name': 'caitlinkermen/Coding-Challenges', 'size': '2522'}