Print string at a fixed width

a_string = "abc"
fixed_string = "{0:>5}".format(a_string)
print(f'|{fixed_string}|')
|  abc|