|
import string
|
|
|
|
print(string.format('%.3d', 12))
|
|
print(string.format('%.3f', 12))
|
|
print(string.format('%20.7f', 14.5))
|
|
print(string.format('-- %-40s ---', 'this is a string format test'))
|
|
print(string.format('-- %40s ---', 'this is a string format test'))
|