Python - Formatting codes & escape characters

 0    32 fiszki    sir
ściągnij mp3 drukuj graj sprawdź się
 
Pytanie Odpowiedź
Left aligns the result (within the available space)
rozpocznij naukę
:<
Right aligns the result (within the available space)
rozpocznij naukę
:>
Center aligns the result (within the available space)
rozpocznij naukę
:^
Places the sign to the left most position
rozpocznij naukę
:=
Use a plus sign to indicate if the result is positive or negative
rozpocznij naukę
:+
Use a minus sign for negative values only
rozpocznij naukę
:-
Use a space to insert an extra space before positive numbers (and a minus sign befor negative numbers)
rozpocznij naukę
:
Use a comma as a thousand separator
rozpocznij naukę
:,
Use a underscore as a thousand separator
rozpocznij naukę
:_
Binary format
rozpocznij naukę
:b
Converts the value into the corresponding unicode character
rozpocznij naukę
:c
Decimal format
rozpocznij naukę
:d
Scientific format, with a lower case e
rozpocznij naukę
:e
Scientific format, with an upper case E
rozpocznij naukę
:E
Fix point number format
rozpocznij naukę
:f
Fix point number format, in uppercase format (show inf and nan as INF and NAN)
rozpocznij naukę
:F
General format
rozpocznij naukę
:g
General format (using a upper case E for scientific notations)
rozpocznij naukę
:G
Octal format
rozpocznij naukę
:o
Hex format, lower case
rozpocznij naukę
:x
Hex format, upper case
rozpocznij naukę
:X
Number format
rozpocznij naukę
:n
Percentage format
rozpocznij naukę
:%
Old formatting codes:
rozpocznij naukę
%s, %d, %r, %a
%r -^ repr(); %a -^ repr() in Ascii
Alert
rozpocznij naukę
\a
Backspace
rozpocznij naukę
\b
Female symbol
rozpocznij naukę
\f
Male symbol
rozpocznij naukę
\v
Newline
rozpocznij naukę
\n
Tab
rozpocznij naukę
\t
Escape to hexadecimal notation
rozpocznij naukę
\xnn
Octal notation
rozpocznij naukę
\nnn

Musisz się zalogować, by móc napisać komentarz.