Pad String to Specified Length in Python | Challenge

# Introduction In Python, sometimes we need to pad a string with a specific character to make it a certain length. For example, we may want to pad a string with spaces on both sides to make it a certain length. In this challenge, you will be tasked with writing a function that pads a string on both sides with the specified character, if it's shorter than the specified length.

|
60 : 00

Click the virtual machine below to start practicing