It means you need to type everything but the $
in the terminal.
python test1.py
It's just a convention though. Authors also use > python test1.py
and other notations.
I don't know which version of his book you're reading, but he mentions it in this version.
In the example that follows, $ is a sample system prompt for you to type a command like python in the terminal window. We’ll use it for the code examples in this book, although your prompt might be different.