B Character Map

The print() function allows you to easily make any character you can type on the keyboard appear on the screen. However, there are many other characters you may like to display: the hearts, diamonds, clubs, and spades card suits; lines; shaded boxes; arrows; music notes; and so on. You can obtain string values of these characters by passing their numeric code, called a Unicode code point, to the chr() function. Text is stored on computers as a series of numbers, with each character represented by a different number. This appendix contains a list of such code points.

Using the chr() and ord() Functions

Python’s built-in

Get The Big Book of Small Python Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.