Python - Formatting codes & escape characters

 0    32 adatlap    sir
letöltés mp3 Nyomtatás játszik ellenőrizze magát
 
kérdés válasz
Left aligns the result (within the available space)
kezdjen tanulni
:<
Right aligns the result (within the available space)
kezdjen tanulni
:>
Center aligns the result (within the available space)
kezdjen tanulni
:^
Places the sign to the left most position
kezdjen tanulni
:=
Use a plus sign to indicate if the result is positive or negative
kezdjen tanulni
:+
Use a minus sign for negative values only
kezdjen tanulni
:-
Use a space to insert an extra space before positive numbers (and a minus sign befor negative numbers)
kezdjen tanulni
:
Use a comma as a thousand separator
kezdjen tanulni
:,
Use a underscore as a thousand separator
kezdjen tanulni
:_
Binary format
kezdjen tanulni
:b
Converts the value into the corresponding unicode character
kezdjen tanulni
:c
Decimal format
kezdjen tanulni
:d
Scientific format, with a lower case e
kezdjen tanulni
:e
Scientific format, with an upper case E
kezdjen tanulni
:E
Fix point number format
kezdjen tanulni
:f
Fix point number format, in uppercase format (show inf and nan as INF and NAN)
kezdjen tanulni
:F
General format
kezdjen tanulni
:g
General format (using a upper case E for scientific notations)
kezdjen tanulni
:G
Octal format
kezdjen tanulni
:o
Hex format, lower case
kezdjen tanulni
:x
Hex format, upper case
kezdjen tanulni
:X
Number format
kezdjen tanulni
:n
Percentage format
kezdjen tanulni
:%
Old formatting codes:
kezdjen tanulni
%s, %d, %r, %a
%r -^ repr(); %a -^ repr() in Ascii
Alert
kezdjen tanulni
\a
Backspace
kezdjen tanulni
\b
Female symbol
kezdjen tanulni
\f
Male symbol
kezdjen tanulni
\v
Newline
kezdjen tanulni
\n
Tab
kezdjen tanulni
\t
Escape to hexadecimal notation
kezdjen tanulni
\xnn
Octal notation
kezdjen tanulni
\nnn

Kommentár közzétételéhez be kell jelentkeznie.