Vertically align output of counters
Level: Intermediate (score: 3)
In this Bite you are tasked with "physically" aligning the number of comments on a webpage.
For some reason you are not 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!