Bite 162. Vertically align output of counters

In this Bite you are tasked with "physically" aligning the number of comments on a webpage.

For some reason you are now allowed to use the pre tag so you are asked to prepend each number with one or more HTML spaces ( ).

You need to make sure the comment counts line up vertically, so in order for the web page to show this:

   1
  20
 315
1239

You need to produce this output:

   1
  20
 315
1239

Complete prefill_with_character(value, column_length=4, fill_char=' ') to achieve this.

Your code is expected to also work if other values are provided for the column_length and fill_char arguments. Have fun!

Will you be Pythonista #21 to crack this Bite?
It takes an average of ~14 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 1.5 on a 1-10 difficulty scale.
» You can do it! 😌

Login and get coding
We use Python 3.7