Which of the following produces this list?
[65, 66, 67, 68]
Applying ord to each character in ABCD returns its numeric character code: A is 65, B is 66, C is 67, and D is 68. In Python 2, map(ord, 'ABCD') returns those values as a list.
ord
ABCD
A
B
C
D
map(ord, 'ABCD')
Community Discussion