How To/test/

#'Data urodzienia (y-m-d): {}-{}-{}'.format(1990, 12,23)

http://docs.python.org/library/string.html#grammar-token-format_spec

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0:.>10}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: .........2!'

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0:.<10}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: 2.........!'

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0:.^10}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: ....2.....!'

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0:+ =10}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: ....2.....!'

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0: =+10}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: +        2!'

>>> 'I have {0} cats and {1} dogs. Dogs: {1}, cats: {0: =+10.3f}!'.format(2,4)
'I have 2 cats and 4 dogs. Dogs: 4, cats: +    2.000!'

# liczba o całkowitej długości 10 w tym separator dziesiętny i 3 miejsca dziesiętne.
>>> '{0: >10.3f}'.format(5.56)

# liczba o całkowitej długości 10 w tym separator dziesiętny i 3 miejsca dziesiętne.
>>> '{0:0> 10.3f}'.format(5.56)
'     5.560'
>>> '{0:0> 10.3f}'.format(-5.56)
'    -5.560'

#to samo co wyżej tylko dopełnione zerami, a minus jest przed wyopełnieniem.
>>> '{0:0=-10.3f}'.format(5.56)
'000005.560'
>>> '{0:0=-10.3f}'.format(-5.56)
'-00005.560'