def ngrams(sentence, ngram_size):
  """Converts a string into a list of ngrams of characters.

  ngrams('abra cadabra', 5) =
    [('a', 'b', 'r', 'a', ' '), ('b', 'r', 'a', ' ', 'c'), ...
     ('a', 'd', 'a', 'b', 'r'), ('d', 'a', 'b', 'r', 'a')]
  """
  chars = list(sentence)
  return zip(*[chars[i:] for i in range(ngram_size)])