On wordpress.com, you can’t install plugins, so you have to use WordPress’ built-in widget.
Do it like:
[code language='python'] [/code]
Note that those tags go inside your visual editor, not the HTML editor.
You can find more information here.