Logo

Programming-Idioms

History of Idiom 142 > diff from v24 to v25

Edit summary for version 25 by justafoo:
[Python] d

Version 24

2019-09-26, 18:29:32

Version 25

2019-09-26, 18:30:31

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Idiom #142 Hexadecimal digits of an integer

Assign to string s the hexadecimal representation (base 16) of integer x.

E.g. 999 -> "3e7"

Extra Keywords
hex hexa radix
Extra Keywords
hex hexa radix
Code
s = format(x, 'x')
Code
s = hex(x)