The default console REPL does not have syntax highlighting. However The IDLE IDE that ships with CPython has a syntax-highlighting REPL (interactive shell).
IPython 5 also has syntax highlighting in REPL:

(source: jupyter.org)
Python REPL with syntax highlighting, autocomplete and multiline editing
Syntax highlighting language request: Python REPL - Meta Stack Exchange
python - Color-coded syntax in terminal - Stack Overflow
Python REPL (interactive shell) with syntax highlighting, fast autocompletion and multiline editing.
You should probably have searched a little bit more first, because there are many answers here about this. Perhaps the best ones are:
- bpython [NOT on Windows without hack.]
- ipython
- Change Python interactive prompt ">>>"
- Some characters stick to my colorized prompt in Python cmd
- Adding colors in python interpreter prompt, does not wrap properly
- How to fix column calculation in Python readline if using color prompt
Other Attmepts to improve the python REPL:
- https://github.com/prompt-toolkit/ptpython - A python package
However, I find PtPython trying to do too much, and thus have a bloated dependency structure on: appdirs, jedi, prompt_toolkit, pygments, and indirectly to tox, wcwidth, parso, and possibly more, which is why I prefer my own no-nonsense 3-line ~/.pyrc solution for trivial changes as asked in this question.
As of Python 3.13 (although improved in 3.14) the Python REPL now supports colour, see here.
Besides the REPL you ask about, 3.14 also brought colour to the output from a few standard library CLIs and PDB's output, see What's new in Python 3.14
basically the title, is it possible to get syntax highlighting in the python shell when using it in the command line?