title: How to pad with n characters in Python
body: <p>I should deﬁne a function <code>pad_with_n_chars(s, n, c)</code> that takes a
  string 's', an integer 'n', and a character 'c' and returns
  a string consisting of 's' padded with 'c' to create a
  string with a centered 's' of length 'n'. For example,
  <code>pad_with_n_chars(”dog”, 5, ”x”)</code> should return the
  string "<code>xdogx</code>".</p>