Finding all occurrences of a character in a string

May 5, 2018
python

A simple function in python to return a list of all occurrences of a given character in a string.

def findOccurences(s, ch):
    return [i for i, letter in enumerate(s) if letter == ch]

Purge all items from an AWS dynamodb table with an exponential timing back-off

May 21, 2018
aws dynamodb python

Copy an AWS dynamodb table to an existing table with an exponential timing back-off

May 20, 2018
aws dynamodb python

Return the key with the maximum value in a dictionary using python

May 14, 2018
python