Python - Formatting codes & escape characters

 0    32 speciālā zīme    sir
lejupielādēt mp3 Drukāt spēlēt pārbaudiet sevi
 
jautājums atbilde
Left aligns the result (within the available space)
sākt mācīties
:<
Right aligns the result (within the available space)
sākt mācīties
:>
Center aligns the result (within the available space)
sākt mācīties
:^
Places the sign to the left most position
sākt mācīties
:=
Use a plus sign to indicate if the result is positive or negative
sākt mācīties
:+
Use a minus sign for negative values only
sākt mācīties
:-
Use a space to insert an extra space before positive numbers (and a minus sign befor negative numbers)
sākt mācīties
:
Use a comma as a thousand separator
sākt mācīties
:,
Use a underscore as a thousand separator
sākt mācīties
:_
Binary format
sākt mācīties
:b
Converts the value into the corresponding unicode character
sākt mācīties
:c
Decimal format
sākt mācīties
:d
Scientific format, with a lower case e
sākt mācīties
:e
Scientific format, with an upper case E
sākt mācīties
:E
Fix point number format
sākt mācīties
:f
Fix point number format, in uppercase format (show inf and nan as INF and NAN)
sākt mācīties
:F
General format
sākt mācīties
:g
General format (using a upper case E for scientific notations)
sākt mācīties
:G
Octal format
sākt mācīties
:o
Hex format, lower case
sākt mācīties
:x
Hex format, upper case
sākt mācīties
:X
Number format
sākt mācīties
:n
Percentage format
sākt mācīties
:%
Old formatting codes:
sākt mācīties
%s, %d, %r, %a
%r -^ repr(); %a -^ repr() in Ascii
Alert
sākt mācīties
\a
Backspace
sākt mācīties
\b
Female symbol
sākt mācīties
\f
Male symbol
sākt mācīties
\v
Newline
sākt mācīties
\n
Tab
sākt mācīties
\t
Escape to hexadecimal notation
sākt mācīties
\xnn
Octal notation
sākt mācīties
\nnn

Lai ievietotu komentāru, jums jāpiesakās.