You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
228 B
9 lines
228 B
# Python 3.10+ functionality test for {} format string
|
|
|
|
def test(fmt, *args):
|
|
print('{:8s}'.format(fmt) + '>' + fmt.format(*args) + '<')
|
|
|
|
test("{:0s}", "ab")
|
|
test("{:06s}", "ab")
|
|
test("{:<06s}", "ab")
|
|
test("{:>06s}", "ab")
|
|
|